• v4.1.6 throws the following error and breaks the site:

    [Tue Aug 20 12:24:35.351214 2024] [proxy_fcgi:error] [pid 57509:tid 140511960606272] [client 170.75.162.34:0] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught TypeError: json_decode(): Argument #1 ($json) must be of type string, array given in /var/www/vhosts/DOMAIN.com/DOMAIN.com/wp-content/plugins/estatik/includes/classes/entities/class-property.php:1077\nStack trace:\n#0 /var/www/vhosts/DOMAIN.com/DOMAIN.com/wp-content/plugins/estatik/includes/classes/entities/class-property.php(1077): json_decode()\n#1 /var/www/vhosts/DOMAIN.com/DOMAIN.com/wp-content/plugins/estatik/includes/classes/entities/class-entity.php(53): Es_Property->get_field_value()\n#2 /var/www/vhosts/DOMAIN.com/DOMAIN.com/wp-content/plugins/estatik/includes/loop-functions.php(117): Es_Entity->__get()\n#3 /var/www/vhosts/DOMAIN.com/DOMAIN.com/wp-content/plugins/estatik/templates/front/property/content-archive-image.php(8): es_get_the_field()\n#4 /var/www/vhosts/DOMAIN.com/DOMAIN.com/wp-content/plugins/estatik/includes/fu...'

    PHP 8.2.22

    • This topic was modified 1 year, 9 months ago by Adam.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Adam

    (@dahamsta)

    PHP 8.2.22

    Same problem here.

    Edit: if you comment this lines in the file the error says around line 1077, plugin seems to work ok with no error for me.
    Note: make all the backups you need to recover before edit the file.

    /*
    $decoded_value = json_decode( $gallery_json_string, true );

    if ( json_last_error() === JSON_ERROR_NONE ) {
    $value = array_values( $decoded_value );
    }
    */
    • This reply was modified 1 year, 9 months ago by charlyfisher.

    Thanks for posting that. Been dealing with this same error and your “fix” worked. Hopefully author will fix soon… or at least comment…

    Had to do the same “fix” – any insights from the Developer team?

    Plugin Author Estatik

    (@estatik)

    Hi!
    Please update the plugin to the latest version; this conflict has been fixed in the update.

    tradesouthwest

    (@tradesouthwestgmailcom)

    I got [09-Feb-2025 19:00:24 UTC] PHP Fatal error: Uncaught Error: Call to undefined function json_decode() in /home/qkobcfli/domains/cginvoice.com/public_html/info/wp-includes/functions.php:4666 and the only fix was to edit wp-includes/functions.php

    Here is my fix (too long to post here…. 99% of the time I never check wp.org forums because they rarely give any answers worth a dime).

    https://gist.github.com/tradesouthwest/e8495878ff3f6c592b2cd5b91f3a4c32

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘json_decode fatal error’ is closed to new replies.