Skip to main content
Tweeted twitter.com/StackWordPress/status/1458902383082233871
Commonmark migration
Source Link

When I use:

define('WP_DEBUG', 1);

In my wp-config.php, it works fine, but I am hacking an old theme and I would like to suppress deprecated notices.

My understanding is that adding this:

error_reporting( E_ERROR | E_NOTICE | E_PARSE )

Should do the trick. I have added it to wp-config.php and to header.php in my theme. Unfortunately, it has no effect. Is this something set at server level? Also the following makes no difference as well:

ini_set('display_errors', 1);

As asked in the comments below here's a couple of the notices. I am using a hacked version of the Construct 2 theme, quite old now but it would not be safe to update it. I am trying to persuade the client to let me rewrite it, the site is fairly simple, but as he can't see anything wrong, it's not broken, he won't spend the money.

Deprecated: Assigning the return value of new by reference is deprecated in /Volumes/Macintosh HD/Sites/MAMP (custodian)/wordpress/wp-content/themes/construct2/option-tree/ot-loader.php on line 369

 

Strict Standards: Declaration of DropDown_Nav_Menu::start_lvl() should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = Array) in /Volumes/Macintosh HD/Sites/MAMP (custodian)/wordpress/wp-content/themes/construct2/dropdown-menus.php on line 192

When I use:

define('WP_DEBUG', 1);

In my wp-config.php, it works fine, but I am hacking an old theme and I would like to suppress deprecated notices.

My understanding is that adding this:

error_reporting( E_ERROR | E_NOTICE | E_PARSE )

Should do the trick. I have added it to wp-config.php and to header.php in my theme. Unfortunately, it has no effect. Is this something set at server level? Also the following makes no difference as well:

ini_set('display_errors', 1);

As asked in the comments below here's a couple of the notices. I am using a hacked version of the Construct 2 theme, quite old now but it would not be safe to update it. I am trying to persuade the client to let me rewrite it, the site is fairly simple, but as he can't see anything wrong, it's not broken, he won't spend the money.

Deprecated: Assigning the return value of new by reference is deprecated in /Volumes/Macintosh HD/Sites/MAMP (custodian)/wordpress/wp-content/themes/construct2/option-tree/ot-loader.php on line 369

 

Strict Standards: Declaration of DropDown_Nav_Menu::start_lvl() should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = Array) in /Volumes/Macintosh HD/Sites/MAMP (custodian)/wordpress/wp-content/themes/construct2/dropdown-menus.php on line 192

When I use:

define('WP_DEBUG', 1);

In my wp-config.php, it works fine, but I am hacking an old theme and I would like to suppress deprecated notices.

My understanding is that adding this:

error_reporting( E_ERROR | E_NOTICE | E_PARSE )

Should do the trick. I have added it to wp-config.php and to header.php in my theme. Unfortunately, it has no effect. Is this something set at server level? Also the following makes no difference as well:

ini_set('display_errors', 1);

As asked in the comments below here's a couple of the notices. I am using a hacked version of the Construct 2 theme, quite old now but it would not be safe to update it. I am trying to persuade the client to let me rewrite it, the site is fairly simple, but as he can't see anything wrong, it's not broken, he won't spend the money.

Deprecated: Assigning the return value of new by reference is deprecated in /Volumes/Macintosh HD/Sites/MAMP (custodian)/wordpress/wp-content/themes/construct2/option-tree/ot-loader.php on line 369

Strict Standards: Declaration of DropDown_Nav_Menu::start_lvl() should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = Array) in /Volumes/Macintosh HD/Sites/MAMP (custodian)/wordpress/wp-content/themes/construct2/dropdown-menus.php on line 192

added 18 characters in body
Source Link
Ethan Rævan
  • 4k
  • 5
  • 27
  • 55

When I use:

define('WP_DEBUG', 1);

In my wp-config.php, it works fine, but I am hacking an old theme and I would like to suppress deprecated notices.

My understanding is that adding this:

error_reporting( E_ERROR | E_NOTICE | E_PARSE )

Should do the trick. I have added it to wp-config.php and to header.php in my theme. Unfortunately, it has no effect. Is this something set at server level? Also the following makes no difference as well:

ini_set('display_errors', 1);

As asked in the comments below here's a couple of the notices. I am using a hacked version of the Construct 2 theme, quite old now but it would not be safe to update it. I am trying to persuade the client to let me rewrite it, the site is fairly simple, but as he can't see anything wrong, it's not broken, he won't spend the money.

Deprecated: Assigning the return value of new by reference is deprecated in /Volumes/Macintosh HD/Sites/MAMP (custodian)/wordpress/wp-content/themes/construct2/option-tree/ot-loader.php on line 369

Deprecated: Assigning the return value of new by reference is deprecated in /Volumes/Macintosh HD/Sites/MAMP (custodian)/wordpress/wp-content/themes/construct2/option-tree/ot-loader.php on line 369

Strict Standards: Declaration of DropDown_Nav_Menu::start_lvl() should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = Array) in /Volumes/Macintosh HD/Sites/MAMP (custodian)/wordpress/wp-content/themes/construct2/dropdown-menus.php on line 192

Strict Standards: Declaration of DropDown_Nav_Menu::start_lvl() should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = Array) in /Volumes/Macintosh HD/Sites/MAMP (custodian)/wordpress/wp-content/themes/construct2/dropdown-menus.php on line 192

When I use:

define('WP_DEBUG', 1);

In my wp-config.php, it works fine, but I am hacking an old theme and I would like to suppress deprecated notices.

My understanding is that adding this:

error_reporting( E_ERROR | E_NOTICE | E_PARSE )

Should do the trick. I have added it to wp-config.php and to header.php in my theme. Unfortunately, it has no effect. Is this something set at server level? Also the following makes no difference as well:

ini_set('display_errors', 1);

As asked in the comments below here's a couple of the notices. I am using a hacked version of the Construct 2 theme, quite old now but it would not be safe to update it. I am trying to persuade the client to let me rewrite it, the site is fairly simple, but as he can't see anything wrong, it's not broken, he won't spend the money.

Deprecated: Assigning the return value of new by reference is deprecated in /Volumes/Macintosh HD/Sites/MAMP (custodian)/wordpress/wp-content/themes/construct2/option-tree/ot-loader.php on line 369

Strict Standards: Declaration of DropDown_Nav_Menu::start_lvl() should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = Array) in /Volumes/Macintosh HD/Sites/MAMP (custodian)/wordpress/wp-content/themes/construct2/dropdown-menus.php on line 192

When I use:

define('WP_DEBUG', 1);

In my wp-config.php, it works fine, but I am hacking an old theme and I would like to suppress deprecated notices.

My understanding is that adding this:

error_reporting( E_ERROR | E_NOTICE | E_PARSE )

Should do the trick. I have added it to wp-config.php and to header.php in my theme. Unfortunately, it has no effect. Is this something set at server level? Also the following makes no difference as well:

ini_set('display_errors', 1);

As asked in the comments below here's a couple of the notices. I am using a hacked version of the Construct 2 theme, quite old now but it would not be safe to update it. I am trying to persuade the client to let me rewrite it, the site is fairly simple, but as he can't see anything wrong, it's not broken, he won't spend the money.

Deprecated: Assigning the return value of new by reference is deprecated in /Volumes/Macintosh HD/Sites/MAMP (custodian)/wordpress/wp-content/themes/construct2/option-tree/ot-loader.php on line 369

Strict Standards: Declaration of DropDown_Nav_Menu::start_lvl() should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = Array) in /Volumes/Macintosh HD/Sites/MAMP (custodian)/wordpress/wp-content/themes/construct2/dropdown-menus.php on line 192

To add examples as asked by one of the comments
Source Link
Chris Pink
  • 734
  • 1
  • 6
  • 21

When I use:

define('WP_DEBUG', 1);

In my wp-config.php, it works fine, but I am hacking an old theme and I would like to suppress deprecated notices.

My understanding is that adding this:

error_reporting( E_ERROR | E_NOTICE | E_PARSE )

Should do the trick. I have added it to wp-config.php and to header.php in my theme. Unfortunately, it has no effect. Is this something set at server level? Also the following makes no difference as well:

ini_set('display_errors', 1);

As asked in the comments below here's a couple of the notices. I am using a hacked version of the Construct 2 theme, quite old now but it would not be safe to update it. I am trying to persuade the client to let me rewrite it, the site is fairly simple, but as he can't see anything wrong, it's not broken, he won't spend the money.

Deprecated: Assigning the return value of new by reference is deprecated in /Volumes/Macintosh HD/Sites/MAMP (custodian)/wordpress/wp-content/themes/construct2/option-tree/ot-loader.php on line 369

Strict Standards: Declaration of DropDown_Nav_Menu::start_lvl() should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = Array) in /Volumes/Macintosh HD/Sites/MAMP (custodian)/wordpress/wp-content/themes/construct2/dropdown-menus.php on line 192

When I use:

define('WP_DEBUG', 1);

In my wp-config.php, it works fine, but I am hacking an old theme and I would like to suppress deprecated notices.

My understanding is that adding this:

error_reporting( E_ERROR | E_NOTICE | E_PARSE )

Should do the trick. I have added it to wp-config.php and to header.php in my theme. Unfortunately, it has no effect. Is this something set at server level? Also the following makes no difference as well:

ini_set('display_errors', 1);

When I use:

define('WP_DEBUG', 1);

In my wp-config.php, it works fine, but I am hacking an old theme and I would like to suppress deprecated notices.

My understanding is that adding this:

error_reporting( E_ERROR | E_NOTICE | E_PARSE )

Should do the trick. I have added it to wp-config.php and to header.php in my theme. Unfortunately, it has no effect. Is this something set at server level? Also the following makes no difference as well:

ini_set('display_errors', 1);

As asked in the comments below here's a couple of the notices. I am using a hacked version of the Construct 2 theme, quite old now but it would not be safe to update it. I am trying to persuade the client to let me rewrite it, the site is fairly simple, but as he can't see anything wrong, it's not broken, he won't spend the money.

Deprecated: Assigning the return value of new by reference is deprecated in /Volumes/Macintosh HD/Sites/MAMP (custodian)/wordpress/wp-content/themes/construct2/option-tree/ot-loader.php on line 369

Strict Standards: Declaration of DropDown_Nav_Menu::start_lvl() should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = Array) in /Volumes/Macintosh HD/Sites/MAMP (custodian)/wordpress/wp-content/themes/construct2/dropdown-menus.php on line 192

edited title
Link
Tim Malone
  • 4.8k
  • 5
  • 28
  • 41
Loading
Content improvement
Source Link
Ethan Rævan
  • 4k
  • 5
  • 27
  • 55
Loading
Source Link
Chris Pink
  • 734
  • 1
  • 6
  • 21
Loading