oeconomist
Member
Posted 1 year ago #
Diagnostic:
Warning: parse_url() expects exactly 1 parameter, 2 given in /home/userid/public_html/wp/wp-content/plugins/comment-saver/comment-saver.php on line 23
I've not yet walked through the code to find-out what is happening here, but I notice that there is some Javascript in-play. Perhaps the plugin doesn't degrade gracefully when the user doesn't have Javascript enabled.
Other plugins installed on the 'blog-in-question include YATCP and Edit Comments XT. Theme is Connections Reloaded v1.5.
BTW, great idea for a plugin!
http://wordpress.org/extend/plugins/comment-saver/
oeconomist
Member
Posted 1 year ago #
Okay, I just tried the plugin on a 'blog which had the default theme, and viewed it with Javascript enabled, and got exactly the save error message (except that the userid were different).
I still haven't walked-through the code, but my next thought is that this issue relates to the installed version of PHP.
oeconomist
Member
Posted 1 year ago #
Yep, as per the PHP documentation, an optional second parameter for parse_url was added beginning with PHP 5.1.2. If one uses a single parameter, then parse_url returns an associative array, in which the path is an identifiable element.
So my suggestion is that you replace the three invocations
$path = parse_url(get_option('home'), PHP_URL_PATH);
with
$url_bits = parse_url(get_option('home'));
$path = $url_bits['path'];
ahh... didn't realize that was only in php5. I've applied your change and tagged v1.2. Thanks.