ishydee's avatar

Intervention->save() symphony error

Hi,

Having no success saving images with intervention. I'm just testing with Tinker.

The following lines work and return the appropriate responses:

$img = Image::make('public/photos/sample.jpg') $new = Image::canvas(400,400,'#000000')->insert($img,'center')

I'm stuck with an error after this line: $new->save('public/photos/testimage.jpg')

Symfony\Component\Console\Exception\InvalidArgumentException with message 'Incorrectly nested style tag found.'

Not a clue what is going on. I've checked permissions on public/photos as dropzone is easily able to upload there. Thanks for any help.

0 likes
3 replies
jamesoneill's avatar

I've had a few problems with this myself but noticed that the images themselves were actually saving.

After doing some tinkering in the source code for Image::save() it seems that the exception isn't thrown until after the method has returned. My guess is that the PHP REPL has some issue parsing the returned object in order to print it.

Unfortunately I don't have a solution to this but you shouldn't have the issue outside of tinker.

MaxMatteo's avatar

having the same issue..and no clue how to solve it

oceres's avatar

I had similar issue, using tinker I was trying to get a simple list of Products ($products = App\Product::all(); ) getting the message "Symfony\Component\Console\Exception\InvalidArgumentException with message 'Incorrectly nested style tag found.' ". The way I resolve this was writting the tinker command 'optimize'. Hope it helps.

Yo tuve un problema similar, usando Tinker para obtener una simple lista de Productos ($products = App\Product::all(); ) obtenia el mensaje "Symfony\Component\Console\Exception\InvalidArgumentException with message 'Incorrectly nested style tag found.' ". La manera en que resolvi esto fue escribiendo el comando tinker 'optimize'. Espero esto ayude.

Please or to participate in this conversation.