Invalid arguments passed to implode()
-
Hello,
I have noticed the following PHP warning in debug.log:
[03-Sep-2020 08:48:27 UTC] PHP Warning: implode(): Invalid arguments passed in wp-content/plugins/post-smtp/Postman/PostmanLogFields.php on line 63
To resolve this, I add one check if json_decode() return an array before attempt to do implode, so replaced line 63:
return implode( ',', json_decode( $json, true ) );
with this:
$json_array = json_decode( $json, true ); if ( is_array($json_array) ) { return implode( ',', $json_array ); }
Cheers,
Aleksandar
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Invalid arguments passed to implode()’ is closed to new replies.