• Resolved Andrew.Bloom

    (@andrewbloom)


    Updated to WP 3.9 and am getting this error:

    Warning: strpos() expects parameter 1 to be string, array given in /public_html/wp-includes/shortcodes.php on line 193

    I researched a bit, and it seems to be a functions.php issue with blank space. But I do not have any blank space there.

    Is anyone else experiencing this issue?

    Thanks

Viewing 11 replies - 16 through 26 (of 26 total)
  • The theme was twentytwelve child
    It was while embedding the Jetpack form. If you Google the error it looks like it is other Jetpack forms.

    Flexer

    Add my name to the list having the same issue with 3.9

    After debugging for several minutes, I think i found the problem.

    In grunion-contact-form.php line 601.

    parse_content( $content )

    is used in: (line 508)
    __construct( $attributes, $content = null )

    where:

    $this->parse_content( $content );

    and the $content there is not passing the sanitation to make it a string.

    to solve this:
    simply change (line 593)

    $this->parse_content( $content );

    to

    $this->parse_content( $this->content );

    probably just small typo?

    Cool that worked.

    I previously opened a support ticket with JetPack and I’ll update them with your solution turtlepod. It should go into future code so your solution does not get erased when JP gets an update.

    Thanks
    Daveed

    Thanks Webstart Marketing

    I was able to edit the file using notepad++

    However i am not able to replace it in the wp-includes folder
    I am also no able the edit the file inside the folder itself.

    Can anyone please assist me as to how i can edit the shortcodes file

    Why are you nto able to edit the file? Are you getting an eror?

    My guess- read write permissions are incorrect

    Interestingly it does not give any error message when i edit file in the wp-includes folder.

    While copying an edited file in the location it states “Cant copy this file in this location”.

    I even changed the permission for the wp-includes folder to User – Read Write and Execute.

    In the text editor after “add this form to my post”, I simply deleted the text in this particular warning. The rest of the fields came out fine. You would only have trouble if you’re creating dozens of contact forms (would be tedious)

    My form starts here:

    Give us some feedback. We do appreciate!
    Warning: strpos() expects parameter 1 to be string, array given in /home/…./wp-includes/shortcodes.php on line 193
    [contact-form][contact-field label… etc etc

    I’m getting this warning in 3.9.1. I have disabled all warnings for now. But what is the fix for shortcodes? The warning shows up on ANY page I have a shortcode on.

    PHP is 5.4 cannnot be changed.

    Do not not edit core php files.

    if ( false === strpos( (string) $content, ‘[‘ ) ) {

    Can someone help? warning gone, but now layer slider is gone.

    Webstract Marketing YOU ARE A FRICKEN GODSEND THANK YOU

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘WP 3.9: Warning: strpos() expects parameter 1 to be string’ is closed to new replies.