• edival

    (@edival)


    Trying to import the exported JSON object but getting the following error:
    [23-Nov-2021 17:51:19 UTC] PHP Fatal error: Uncaught TypeError: json_decode(): Argument #1 ($json) must be of type string, array given in /home/site/wp-content/plugins/client-documentation/client-documentation.php:830

    It looks like you’re trying to json_decode on a PHP array instead of a string. Is there a fix for this?

    The PHP related is:

    $opt = $data[1]['data'];
    foreach( $set as $st ){
      if( !empty($opt[$st]) && $st == 'user_role' ) $this->settings[$st] = json_decode($opt[$st]);
      elseif( !empty($opt[$st]) ) $this->settings[$st] = $opt[$st];
    }
Viewing 1 replies (of 1 total)
  • Thread Starter edival

    (@edival)

    I found a fix:
    Line 830 of client-documentation.php, remove json_decode() from around $opt[$st];

    Works perfectly.

Viewing 1 replies (of 1 total)
  • The topic ‘Import Data’ is closed to new replies.