var_dump showing up in logs
-
Hi,
Thanks for the great plugin, we have been using it for a long time.
We are running some WordPress cron jobs from the CLI. Unfortunately the log files are full of messages from this plugin. The culprit is the use of var_dump for example in public/frontend.php line 627:
setcookie( 'gtm4wp_last_weatherstatus', 'Openweathermap.org did not return processable data: ' . var_dump( $weatherdata, true ) )
Unlike print_r, var_dump does not support a print/return parameter. This means that the use of true in the second parameter has no effect and the content is printed to the terminal. I suggest to replace all var_dump with print_r or var_export which does support the print/return parameter.
Andre
- The topic ‘var_dump showing up in logs’ is closed to new replies.