I have got the following error:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate
34820 bytes) in rotate.php
I did not mange to reproduce it , How can I prevent such things and how can I catch that and return false instead of crash the process.
I can say that I added logger to my code maybe is it related to that error?.
php ini configuration:
memory_limit = 128M
rotation code:
$this->logger->info();
$source = imagecreatefromjpeg($img);
$rotate = imagerotate($source, $rotate_angle, 0);
imagejpeg($rotate,$img);