Snapshot errors - more

I am now seeing these errors... what do these mean?

2012-10-30 22:49:58: Notice: errno:8 Undefined variable: db_name /home/mysitename/public_html/wp-content/plugins/snapshot/lib/snapshot_utilities.php on line 90
2012-10-30 22:49:58: Notice: errno:8 Undefined variable: wpdb_prefix /home/mysitename/public_html/wp-content/plugins/snapshot/lib/snapshot_utilities.php on line 91

  • aecnu

    Greetings robert_andrews,

    Sorry to hear that you are having an issue with Snapshot and I honestly do not know why you are having those errors in which I cannot reproduce and have never seen before.

    Therefore I will see if I can get the very responsive and professional lead developer in here with his invaluable insight into this plugin for his advice/advise for us.

    Though this may take a bit longer then a normal ticket, I will try to get him in here asap.

    Cheers, Joe

  • Paul

    Thanks @aecnu,

    @robert_andrews,

    Those Notices you are seeing in the snapshot logs (assumed those are log entries) are strange. Here are the line 90 and 91 from snapshot_utilities.php

    90 $db_name = DB_NAME;
    91 $wpdb_prefix = str_replace('_', '\_', $wpdb->prefix);

    On line 90 we are taking the defined DB_NAME which is setup in your wp-config.php and assigning it to a local variable.

    On line 91 we are taking the database prefix from the global $wpdb class and filtering it to escape the underscores for the query we are about to execute. The $wpdb->prefix should always be defined.

    So again we are taking what should be considered global variables and creating local versions that are being used. Not sure why you are seeing these Notices. Since those should always be there. What other plugins or theme are you running? I've seen some plugins like our own Multi-DB that will sub-class the WordPress $wpdb class to extend it. But it keeps the legacy items like prefix.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.