WordPress.org

Ready to get started?Download WordPress

Forums

BlackBox Debug Bar
php notice, small hint (13 posts)

  1. Frank
    Member
    Posted 3 years ago #

    At first, great idea and plugin.
    Please can you add a small check for $_SESSION to deactivate my php notices; i have all warnings anf notice on at my development client.
    Many thanks

    private function __construct()
        {
            $this->_profiler = new BlackBox_Profiler();
            if ( !isset($_SESSION) )
            	$_SESSION = '';
            $this->_globals = array(
                'get' => $_GET,
                'post' => $_POST,
                'cookie' => $_COOKIE,
                'session' => $_SESSION,
                'server' => $_SERVER
            );
        }

    http://wordpress.org/extend/plugins/blackbox-debug-bar/

  2. Greg Winiarski
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks for your support @Frank, i will add the code over the weekend.

  3. Frank
    Member
    Posted 3 years ago #

    maybe you can also include a solutino for not overlay obout the WP Admin Bar. Maybe you give the bottom:0 on the fixed div.

  4. Frank
    Member
    Posted 3 years ago #

    also:
    NOTICE: wp-content/plugins/blackbox-debug-bar/application/debug-bar.php:14 - Undefined index: errno
    NOTICE: wp-content/plugins/blackbox-debug-bar/application/debug-bar.php:111 - Undefined index: errno
    NOTICE: wp-content/plugins/blackbox-debug-bar/application/debug-bar.php:111 - Undefined index: name
    NOTICE: wp-content/plugins/blackbox-debug-bar/application/debug-bar.php:113 - Undefined index: message
    NOTICE: wp-content/plugins/blackbox-debug-bar/application/debug-bar.php:113 - Undefined index: line
    NOTICE: wp-content/plugins/blackbox-debug-bar/application/debug-bar.php:113 - Undefined index: file

  5. sparkweb
    Member
    Posted 3 years ago #

    I get a lot of these.

    Notice: Use of undefined constant E_DEPRECATED - assumed 'E_DEPRECATED' in /var/www/vhosts/foxy-shop.com/subdomains/dev/httpdocs/wp-content/plugins/blackbox-debug-bar/application/BlackBox.php on line 131
    
    Notice: Undefined index: count in /var/www/vhosts/foxy-shop.com/subdomains/dev/httpdocs/wp-content/plugins/blackbox-debug-bar/application/BlackBox.php on line 142

    I would love to run this for a short time in my production environment. Could it be displayed only if you are a logged-in wordpress user?

  6. Greg Winiarski
    Member
    Plugin Author

    Posted 3 years ago #

    @sparkweb, currently not, however i am thinking about doing something else. I want to add a possibility to whitelist IP addresses that will see the debug bar.

    I know that it's not a perfect solution, but will allow to debug frontend when users is not logged in as well.

    @Frank, can't really trace the:
    NOTICE: wp-content/plugins/blackbox-debug-bar/application/debug-bar.php:113 - Undefined index: file

    can you let me know how to replicate it?

  7. sparkweb
    Member
    Posted 3 years ago #

    Hi Greg, that would be great. My only complaint would be that the bar would be visible when first installed until I went to put in the whitelist IP. Maybe the IP could be loaded in as a default in the plugin files as well for a smoother transition? I think that most users of your plugin are plenty comfortable editing plugin files.

    Regarding Frank's problem, it sounds like in this case there wasn't a file entry in the $error array. You could check for this by doing something like this:

    if (array_key_exists('file', $error) echo $error['file'];

    EDIT: Thinking a little more about this, I think that in Frank's case an empty error array got added to the database. Just check for this right underneath this line:

    foreach($bb->getErrors() as $error)

    by adding this:

    if (array_key_exists('errno', $error) :

    Then it won't try to display any empty error array lines.

  8. Frank
    Member
    Posted 3 years ago #

    current i have update to 0.1.1 and i have no error ors notices. :)
    But i hav ethe problem, after activate the plugin it is not in the plugin.php list of WP backend, it is not so easy to deactivate the plugin. Maybe a error in html?

  9. Greg Winiarski
    Member
    Plugin Author

    Posted 3 years ago #

    Hmmm, i am not sure what's the problem, i see the plugin on the list in plugins.php

    What WordPress are you using?

  10. sparkweb
    Member
    Posted 3 years ago #

    Version 0.1.1 is great. I do have the same problem as Frank, though. This screenshot might help explain: http://screencast.com/t/8WwgX0tOw

    Running WP 3.1

    Question: would it be possible to put print_r($wp) into the Globals dropdown? That might be some really handy information.

  11. Frank
    Member
    Posted 3 years ago #

    the screenshot view my problem, i used on 3.1 and 3.2-alpha.
    I have tested with a clean install, without plugins and twenty ten theme.

  12. Greg Winiarski
    Member
    Plugin Author

    Posted 3 years ago #

    Ok got it, should be fixed in 0.1.2, thanks for the help @Frank and @sparkweb!

  13. sparkweb
    Member
    Posted 3 years ago #

    Yup, it's fixed in 0.1.2. 5-star rating left. Thanks for a great plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic