Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

var_dump showing up in logs

$
0
0

Replies: 0

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

  • This topic was modified 2 minutes ago by drsdre.

Viewing all articles
Browse latest Browse all 59525

Trending Articles