WordPress.org

Ready to get started?Download WordPress

Forums

Deko Boko
[resolved] stripslashes() error (7 posts)

  1. dgw
    Member
    Posted 3 years ago #

    Why am I seeing this error on my contact page?

    Warning: stripslashes() expects parameter 1 to be string, array given in /home/myuser/technobabbl.es/wp-content/plugins/deko-boko-a-recaptcha-contact-form-plugin/DekoBoko.php on line 629

    Looks like a bugfix is needed.

    PHP 5.3 FastCGI on DreamHost

    http://wordpress.org/extend/plugins/deko-boko-a-recaptcha-contact-form-plugin/

  2. Mike Toppa
    Member
    Plugin Author

    Posted 3 years ago #

    Hi - this function is called from a few different locations in the code. Could you tell me what you were doing when the error occurred? That will help me narrow it down.

  3. dgw
    Member
    Posted 3 years ago #

    It's shown on my contact form. Link

  4. Mike Toppa
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks for the link. When you go to the Deko Boko settings page, do your settings display normally? I'm wondering if you're seeing blank entries, as this errors suggests to me something has gone wrong with your settings.

    If the settings look ok, and you're comfortable making a minor code change to help me debug why this is happening to you, please go to line 280 in DekoBoko.php, where you'll see this:


    function getContactPage($atts) {
    extract(shortcode_atts(array('template' => DEKOBOKO_DEFAULT_TEMPLATE), $atts));
    $status = false;
    $dekoboko_options = unserialize(get_option('dekoboko_options'));
    array_walk($dekoboko_options, array(DEKOBOKO_PLUGIN_NAME, '_stripslashes'));

    Add a new line before the "array_walk" line, and put in this:


    var_dump($dekoboko_options); exit;

    Then go to your contact form and let me know what you see. You can then remove that line.

    If you're not comfortable editing code, that's fine. In that case, go to http://www.toppa.com/contact and send me an email. Then I'll have your email address and I can send you a file with this modification.

  5. dgw
    Member
    Posted 3 years ago #

    var_dump() output:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    I see no errors on the settings page (/wp-admin/options-general.php?page=deko-boko-a-recaptcha-contact-form-plugin/DekoBoko.php). The only field empty that I can see is the optional welcome message.

  6. Mike Toppa
    Member
    Plugin Author

    Posted 3 years ago #

    Although the code was stripped out here in the forum, I did get it in the email alerting me to your response. I can see what the problem is now. I will get a fix uploaded within the next few days. Thanks very much for helping me debug!

  7. dgw
    Member
    Posted 3 years ago #

    Ten-line code maximum? Jeez. Might as well not have the ability to post code.

    Thanks, toppa!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic