• Resolved Isu

    (@isuke01)


    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 file trait-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 ??

    • This topic was modified 5 months ago by Isu.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Wissam @ Cloudinary

    (@wissamcloudinary)

    Hi @isuke01 ,

    Thank you for your input.
    I will share the issue with our developer and I will let you know our next steps.

    Best Regards,
    Wissam

    Thread Starter Isu

    (@isuke01)

    Thanks to hear it!

    Have a great day!

    Plugin Support Wissam @ Cloudinary

    (@wissamcloudinary)

    Hi @isuke01 again,

    We are looking for the steps to reproduce this behaviour as for now, it is not clear how to reproduce it.
    If you can provide a short video/Loom to get the steps, that would be very helpful.

    Best Regards,
    Wissam

    Plugin Support Wissam @ Cloudinary

    (@wissamcloudinary)

    Hi @isuke01 ,

    I’m following up to see whether you had a chance to look into my last response.

    Please let me know if you have any additional questions, or if there’s anything else I can help with.

    Thanks,
    Wissam

    Thread Starter Isu

    (@isuke01)

    Hi,

    I’m not sure how to reproduce the issue.
    I’m not having access to original server etc of the client.

    We just got the DB from client and imported to our hosting among with files.
    That’s literally all, and in like my first post, just small check or cast to valid data, passed to the function was able to fix the error in case of incorrectly passed data.

    • This reply was modified 4 months ago by Isu.
    Plugin Support Wissam @ Cloudinary

    (@wissamcloudinary)

    Hi @isuke01 ,

    Thank you for your feedback.
    I will share this information with our team.

    Best Regards,
    Wissam

    Plugin Support Wissam @ Cloudinary

    (@wissamcloudinary)

    Hi @isuke01 ,
    I would like to update you that this issue was already fixed in version 3.2.2.
    Please review.
    Best Regards,

    Wissam

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.