• Resolved rexfromars

    (@rexfromars)


    OK, here’s the deal: after manually upgrading to 2.7.1 (the automatic update plug-in didn’t work again, so I used FTP instead), any time I go to use the “Press This” bookmarklet *and* have text copied on the target page, I get the following error:

    Warning: htmlspecialchars_decode() expects parameter 1 to be string, NULL given in /home/myname/public_html/personal/wp-includes/compat.php on line 105

    It works fine if I don’t highlight any text, but that defeats the purpose behind Press This, no?

    Press This worked fine prior to the 2.7.1 upgrade.

    This blog is hosted by JaguarPC. The server is running some flavour of Linux with Apache (1.3.41), PHP (5.2.5) and MySQL (4.1.22).

Viewing 11 replies - 1 through 11 (of 11 total)
  • This certainly seems to be a bug. The $string on line 105 should be $str. This fixes everything.

    Thread Starter rexfromars

    (@rexfromars)

    OK… what am I doing wrong here?

    I changed line 105 from gettype( $string ) to gettype( $str ) and am still getting the error….

    change it on the line before too.

    Connecting the dots: http://core.trac.wordpress.org/ticket/9090

    wp-includes/compat.php
    change line 102 from:
    function htmlspecialchars_decode( $str, $quote_style = ENT_COMPAT )
    to
    function htmlspecialchars_decode( $string, $quote_style = ENT_COMPAT )

    change line 114 from:
    return wp_specialchars_decode( $str, $quote_style );
    to
    return wp_specialchars_decode( $string, $quote_style );

    Thread Starter rexfromars

    (@rexfromars)

    Awesome! The above fix works perfectly!

    Thank you as always for the prompt help! This place rocks! 🙂

    Yay! The press this is finally working for me now. Thanks for this suggestion MichaelH!

    I am surprised how quick the solutions can ALWAYS be found.
    Thank you community.

    Thank you MichaelH !

    Thanks a ton for the heads up on this, guys. I was having some trouble with the WP-Email plugin due to the compat.php error, and these line changes fixed it.

    pds911

    (@pds911)

    Like bigsquaredot, I’m having trouble with the WP-Email plugin.

    I’m not a techie, and I think I’ve tried all of the above combinations.

    Am I supposed to edit all of the following lines:
    102, 104, 105, 114?

    Or just 102 and 114?

    Thanks so much! Saved me a lot of headache …

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘htmlspecialchars_decode() Error, Press This broken after 2.7.1 upgrade’ is closed to new replies.