WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Contact Form 7] first argument should be either a string or an integer

[Resolved] [Plugin: Contact Form 7] first argument should be either a string or an integer

  • Contact Form 7 in Firefox on a mac.

    Is this something to worry about? This appears on every page of the admin side, half-hidden behind the tool bar at the top:

    Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /home/domains/thesolitaryangler.com/docs/blog/wp-content/plugins/contact-form-7/includes/capabilities.php on line 14

    Everything seems to be working otherwise…

    Thanks

    http://wordpress.org/extend/plugins/contact-form-7/

Viewing 14 replies - 1 through 14 (of 14 total)
  • Apart from what you sated, there is a Bad Value for attribute action on the form. The form is currently corrupt and shows the following syntax:

    <form action="" method="post">

    Form action cannot be empty. It is empty now, because of which mail is not sent out. Additionally, maybe because of excessive and incorrect customizing, HTML validation of your site shows serious errors.

    Any suggestions on how to repair?

    I deleted the form and created another, using the Tag Generator, but there still seems to be trouble.

    Try re-installing a fresh version of the plugin. Not just deleting the form or your page. I think it should solve your problem.

    No, this doesn’t solve the Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /www/htdocs/w00f5329/wp-content/plugins/contact-form-7/includes/capabilities.php on line 14 problem. Unfortunately.

    Reinstalled the plugin, but still getting weird code appearing in the dashboard (NOT in the actual site) when I activate contact form 7, before creating any forms…

    “Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in /home/domains/thesolitaryangler.com/docs/blog/wp-content/plugins/contact-form-7/includes/capabilities.php on line 14”

    What other form creation plugins do you recommend?

    Thanks-

    There is a plugin called Easyforms, but I think Contact form 7 is much more interactive. So please, dear developers, find the bug and fix it! I’m very satisfied with your plugin!

    The error occurs only on dashboard.

    http://thesolitaryangler.com/images/contactformtrouble.jpg
    http://thesolitaryangler.com/images/contactformtrouble2.jpg

    The same warning appears in the Plugin menu, and under the top tool bar in the Dashboard. Eveything’s fine when I deactivate Contact Form 7.

    Plugin Author Takayuki Miyoshi

    @takayukister

    It has been fixed in the development version. Download it from http://wordpress.org/extend/plugins/contact-form-7/developers/

    Got it – thanks!

    Is it necessary to generate new fields using the Generator, or can I paste in the text from my previous forms?

    Thanks again.

    Usually you can copy-paste the previous text.

    @takayuki: I got this error message from my translation-plugin:

    Ladeverhalten: Der Autor benutzt load_textdomain statt load_plugin_textdomain Funktion. Dies kann das Verhalten von WordPress ändern, weil einige Filter und Aktionen nun nicht mehr ausgeführt werden. Bitte kontaktieren Sie den Autor deswegen.

    That means:

    Loading behaviour: The author uses load_textdomain instead of load_plugin_textdomain function. This can change the function of WordPress, because some filters and actions won’t be executed anymore. Please contact the author.

    I don’t know if this was your intention or not, but I think you should hear that.

    Thanks for fixing the array-bug!

    Plugin Author Takayuki Miyoshi

    @takayukister

    alve89, you should open a new topic for a new issue, normally. Though, in this case, the message is not correct. Contact Form 7 uses load_textdomain function and does not use it instead of load_plugin_textdomain function. You can ignore the message.

    replace

    if ( array_key_exists( $cap, $meta_caps ) )
            $caps[] = $meta_caps[$cap];

    with

    if(is_string($cap))
        {
          if ( array_key_exists( $cap, $meta_caps ) )
            $caps[] = $meta_caps[$cap];
        }

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘[Resolved] [Plugin: Contact Form 7] first argument should be either a string or an integer’ is closed to new replies.