Support

Home Forums Pre-Sales Compatibility with DBToolkit?

Compatibility with DBToolkit?

Posted: November 26, 2013 at 6:41 am


Marilyn Fletcher

November 26, 2013 at 6:41 am

Wordpress – Version 3.7.1
DB-Toolkit – Version 0.3.3
Event Expresso – Version 3.1.35.L

I would like to purchase a business license for Event Expresso, but I have the following conflict with DBToolkit: Fatal error: Cannot redeclare printr() (previously declared in
…. db-toolkit/data_report/class.php on line 72 …

Is this resolvable? Thank for your help.


Tony

  • Support Staff

November 26, 2013 at 7:11 am

The function ‘printr’ is being declared & used within within Event Espresso.

DB-Toolkit seems to be declaring the function but not using it. You could contact the DB-Toolkit author and ask them to look into this as it seems like an un-needed function.

Personally what I would do is open up \db-toolkit\data_report\class.php

On line 68 you’ll find:

function printr($a) {
    $Return = '<pre>';
    ob_start();
    print_r($a);
    return $Return . ob_get_clean() . '</pre>';
}

As I can’t find a call for that function within DB-Toolkit I would comment out that function:

/*
function printr($a) {
    $Return = '<pre>';
    ob_start();
    print_r($a);
    return $Return . ob_get_clean() . '</pre>';
}
*/

I would however still recommend contacting the plugin author regarding this.


Marilyn Fletcher

November 26, 2013 at 7:17 am

thank you ever so much.


Tony

  • Support Staff

November 26, 2013 at 7:36 am

No Problem 🙂

Please bear in mind the above fix is more of a band aid fix.

Quickly tested and seems to work ok, however, I would again recommend you consult the author of DB-Toolkit as once that plugin updates that modification will be removed. So better for a future proof fix from the author themselves.

The support post ‘Compatibility with DBToolkit?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso