WP_DEBUG TRUE

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

WP_DEBUG TRUE

Haluk Karamete
Even though this constant and all of its brothers (WP_DEBUG_DISPLAY etc.. )
is set to FALSE at the wp-config, I'm getting a PHP notice on the admin
dashboard - from one of the plugins installed.

Notice: Undefined variable: img_width in
...\wp-content\plugins\xxxxx\functions\xxxx.php on line 81

Obviously, there is some poor coding on that plugin author's code (which I
masked above )/ However, that's a different point. ( I will contact him to
fix that error. )

My question is..

Why is it that while the WP_DEBUG gang is set to FALSE at the config, I
still get a PHP notice on the dashboard?
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: WP_DEBUG TRUE

Otto-19
Setting WP_DEBUG to true will enable the PHP display_errors setting
(if WP_DEBUG_DISPLAY
is also true).

However, setting WP_DEBUG to false will not disable the existing default
PHP display_errors setting, which is usually obtained from the php.ini file.

So, turn off display_errors on your hosting system. Most hosts have it on
by default.

For the logic involved: See the wp_debug_mode() function.

-Otto



On Fri, Apr 17, 2015 at 7:25 AM, Haluk Karamete <[hidden email]>
wrote:

> Even though this constant and all of its brothers (WP_DEBUG_DISPLAY etc.. )
> is set to FALSE at the wp-config, I'm getting a PHP notice on the admin
> dashboard - from one of the plugins installed.
>
> Notice: Undefined variable: img_width in
> ...\wp-content\plugins\xxxxx\functions\xxxx.php on line 81
>
> Obviously, there is some poor coding on that plugin author's code (which I
> masked above )/ However, that's a different point. ( I will contact him to
> fix that error. )
>
> My question is..
>
> Why is it that while the WP_DEBUG gang is set to FALSE at the config, I
> still get a PHP notice on the dashboard?
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: WP_DEBUG TRUE

Leo Baiano
The WP_DEBUG setted to false makes the server settings as they are and
their status as true it enables the display of errors, if not already
enabled on the server. Your server is probably configured to display
notifications of PHP.

Take a test including the code below in your wp-config.php:

ini_set ('log_errors', 'On');
ini_set ('display_errors', 'Off');
ini_set ('error_reporting', E_ALL);
define ('WP_DEBUG', false);
define ('WP_DEBUG_LOG', true);
define ('WP_DEBUG_DISPLAY', false);

2015-04-17 9:34 GMT-03:00 Otto <[hidden email]>:

> Setting WP_DEBUG to true will enable the PHP display_errors setting
> (if WP_DEBUG_DISPLAY
> is also true).
>
> However, setting WP_DEBUG to false will not disable the existing default
> PHP display_errors setting, which is usually obtained from the php.ini
> file.
>
> So, turn off display_errors on your hosting system. Most hosts have it on
> by default.
>
> For the logic involved: See the wp_debug_mode() function.
>
> -Otto
>
>
>
> On Fri, Apr 17, 2015 at 7:25 AM, Haluk Karamete <[hidden email]>
> wrote:
>
> > Even though this constant and all of its brothers (WP_DEBUG_DISPLAY
> etc.. )
> > is set to FALSE at the wp-config, I'm getting a PHP notice on the admin
> > dashboard - from one of the plugins installed.
> >
> > Notice: Undefined variable: img_width in
> > ...\wp-content\plugins\xxxxx\functions\xxxx.php on line 81
> >
> > Obviously, there is some poor coding on that plugin author's code (which
> I
> > masked above )/ However, that's a different point. ( I will contact him
> to
> > fix that error. )
> >
> > My question is..
> >
> > Why is it that while the WP_DEBUG gang is set to FALSE at the config, I
> > still get a PHP notice on the dashboard?
> > _______________________________________________
> > wp-hackers mailing list
> > [hidden email]
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



--
Amplexos,

Leo Baiano
Web Developer
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: WP_DEBUG TRUE

Haluk Karamete
Good insight. It's all clear now. Thank you.

On Fri, Apr 17, 2015 at 5:43 AM, Leo Baiano <[hidden email]> wrote:

> The WP_DEBUG setted to false makes the server settings as they are and
> their status as true it enables the display of errors, if not already
> enabled on the server. Your server is probably configured to display
> notifications of PHP.
>
> Take a test including the code below in your wp-config.php:
>
> ini_set ('log_errors', 'On');
> ini_set ('display_errors', 'Off');
> ini_set ('error_reporting', E_ALL);
> define ('WP_DEBUG', false);
> define ('WP_DEBUG_LOG', true);
> define ('WP_DEBUG_DISPLAY', false);
>
> 2015-04-17 9:34 GMT-03:00 Otto <[hidden email]>:
>
> > Setting WP_DEBUG to true will enable the PHP display_errors setting
> > (if WP_DEBUG_DISPLAY
> > is also true).
> >
> > However, setting WP_DEBUG to false will not disable the existing default
> > PHP display_errors setting, which is usually obtained from the php.ini
> > file.
> >
> > So, turn off display_errors on your hosting system. Most hosts have it on
> > by default.
> >
> > For the logic involved: See the wp_debug_mode() function.
> >
> > -Otto
> >
> >
> >
> > On Fri, Apr 17, 2015 at 7:25 AM, Haluk Karamete <[hidden email]
> >
> > wrote:
> >
> > > Even though this constant and all of its brothers (WP_DEBUG_DISPLAY
> > etc.. )
> > > is set to FALSE at the wp-config, I'm getting a PHP notice on the admin
> > > dashboard - from one of the plugins installed.
> > >
> > > Notice: Undefined variable: img_width in
> > > ...\wp-content\plugins\xxxxx\functions\xxxx.php on line 81
> > >
> > > Obviously, there is some poor coding on that plugin author's code
> (which
> > I
> > > masked above )/ However, that's a different point. ( I will contact him
> > to
> > > fix that error. )
> > >
> > > My question is..
> > >
> > > Why is it that while the WP_DEBUG gang is set to FALSE at the config, I
> > > still get a PHP notice on the dashboard?
> > > _______________________________________________
> > > wp-hackers mailing list
> > > [hidden email]
> > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > >
> > _______________________________________________
> > wp-hackers mailing list
> > [hidden email]
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
>
>
>
> --
> Amplexos,
>
> Leo Baiano
> Web Developer
> _______________________________________________
> wp-hackers mailing list
> [hidden email]
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers