500 Error during bulk process
-
Hi there,
We recently used Shortpixel (5.0.3) on a new site and it’s getting stuck during the first step of the bulk process after it found a specific amount of items.
See screenshot:
https://monosnap.com/file/xkHujW7MKhYl9Zfj9FoUraMzGoBcrYIt stops at “3.772” items every time the bulk process is initiated.
The logs is showing me a 500 Fatal error:
[22-Jun-2022 07:37:01 UTC] PHP Fatal error: Uncaught Error: Call to a member function getTimestamp() on bool in /**/public_html/wp-content/plugins/shortpixel-image-optimiser/class/Model/Image/MediaLibraryModel.php:1917 Stack trace: #0 /**/public_html/wp-content/plugins/shortpixel-image-optimiser/class/Model/Image/MediaLibraryModel.php(587): ShortPixel\Model\Image\MediaLibraryModel->checkLegacy() #1 /**/public_html/wp-content/plugins/shortpixel-image-optimiser/class/Model/Image/MediaLibraryModel.php(51): ShortPixel\Model\Image\MediaLibraryModel->loadMeta() #2 /**/public_html/wp-content/plugins/shortpixel-image-optimiser/class/Controller/FileSystemController.php(49): ShortPixel\Model\Image\MediaLibraryModel->__construct() #3 /**/public_html/wp-content/plugins/shortpixel-image-optimiser/class/Controller/FileSystemController.php(80): ShortPixel\Controller\FileSystemCont in /**/public_html/wp-content/plugins/shortpixel-image-optimiser/class/Model/Image/MediaLibraryModel.php on line 1917
Apparently (by looking at the source code from “class/Model/Image/MediaLibraryModel.php” on line 1917), something goes wrong with the date from the metadata of one of our images? Perhaps there is a problem with this particular image’s metadata. But Shortpixel can’t handle this problem which results in a 500 error.
The following function
$newdate = \DateTime::createFromFormat('Y-m-d H:i:s', $data['date']);
is returning a “false” bool with this image so when the following function is triggered:
$newdate->getTimestamp();
It results in an error.
- The topic ‘500 Error during bulk process’ is closed to new replies.