Fatal error when page moved
-
Hi I had an fatal error when we moved page to different server for some reason.
The error:Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /Users/dev-isu/Local Sites/theme/app/public/content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/traits/trait-params.php:59 Stack trace: #0 /Users/dev-isu/Local Sites/theme/app/public/content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/traits/trait-params.php(48): Cloudinary\Settings->set_param_array(Array, '', '') #1 /Users/dev-isu/Local Sites/theme/app/public/content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/traits/trait-params.php(48): Cloudinary\Settings->set_param_array(Array, '', '') #2 /Users/dev-isu/Local Sites/theme/app/public/content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/traits/trait-params.php(48): Cloudinary\Settings->set_param_array(Array, Array, '') #3 /Users/dev-isu/Local Sites/theme/app/public/content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/traits/trait-params.php(48): Cloudinary\Settings->set_param_array(Array, Array, '') #4 /Users/dev-isu/Local Sites/theme/app/public/content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn/php/traits/trait-params.php(48): Cloudinary\Settings->set_param_array(Array, Array, '') #5 /Users/dev-isu/Lo....
Anyway it seems to be an issue with
set_param_array
function recurrency when the$param
is not array for some reason (idk why it happen when we switched the server)
This happens in the filetrait-params.php#46
this can be fixed by simply e.g casting param to array, checking it if it is an array in beginning or when used.I just made an change
from:#L43 $new = $param;
to#L43$new = (array) $param;
With this change everything seems to be working as intended.
Please let me know your take on this, and maybe apply this fix to the code if this is valid fix ??
- You must be logged in to reply to this topic.