Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

rhj4 on "How to stop unwanted PHP Notice"

$
0
0

I have been plagued with PHP Notice messages cluttering up error_log, and I finally figured out the problem. The _doing_it_wrong function in functions.php doesn't test for E_NOTICE. The fix is very simple:

if ( WP_DEBUG && (error_reporting() & E_NOTICE) && apply_filters( 'doing_it_wrong_trigger_error', true ) ) {

A similar fix gets rid of E_DEPRECATED messages in the _deprecated_argument function.


Viewing all articles
Browse latest Browse all 8245

Trending Articles