Recent Topics

1 Jun 08, 2008 20:48    

Hi there;

I get this message:

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/yot/ftp/blog/inc/comments/model/_comment.class.php on line 912

It's displayed under every comment if I set my browser to interprete php files in php 5. As I go back to php4, it's all ok, and this message doesn't appear.

Maybe it's time to adjust the engine to this new php version? I run other scripts on my server which require php5 so it would be nice...

2 Jun 08, 2008 21:50

Hi gupik,

I can't reproduce this error and I don't see what's wrong with the code. What do you have where the error is reported?

	/**
	 * Displays a permalink link to the Comment
	 *
	 * Note: If you only want the permalink URL, use Comment::permanent_url()
	 */
	function permanent_link( $params = array() )
	{
	pre_dump( $params ); // Add this line for debug purposes	
		// Make sure we are not missing any param:
		$params = array_merge( array(
				'before'      => ' ',
				'after'       => ' ',
				'text'        => '#',
				'title'       => '#',
				'class'       => '',
				'nofollow'    => false,
			), $params );
	pre_dump( $params ); // Add this line for debug purposes

		echo $params['before'];
		echo $this->get_permanent_link( $params['text'], $params['title'], $params['class'], $params['nofollow'] );
		echo $params['after'];
	}


Try adding both predump_var( $params ); lines as above and please report the output (two boxes with some output appear in the comment area).

array(4) {
  ["before"]=>
  string(0) ""
  ["after"]=>
  string(7) " from: "
  ["text"]=>
  string(7) "Comment"
  ["nofollow"]=>
  bool(true)
}


array(6) {
  ["before"]=>
  string(0) ""
  ["after"]=>
  string(7) " from: "
  ["text"]=>
  string(7) "Comment"
  ["title"]=>
  string(1) "#"
  ["class"]=>
  string(0) ""
  ["nofollow"]=>
  bool(true)
}

Good luck

3 Feb 26, 2009 10:09

Just noticed that this is still a bug in 2.4.6.

4 Feb 26, 2009 10:14

First box:

array(4) {
["before"]=>
string(0) ""
["after"]=>
string(7) " from: "
["text"]=>
string(7) "Comment"
["nofollow"]=>
bool(true)
}

Second box:

array(6) {
["before"]=>
string(0) ""
["after"]=>
string(7) " from: "
["text"]=>
string(7) "Comment"
["title"]=>
string(1) "#"
["class"]=>
string(0) ""
["nofollow"]=>
bool(true)
}

(wow pre_dump makes ugly output)

5 Mar 25, 2009 04:31

Some extra info, as this is the single biggest message in my error log:

I've got this feeling we get this error when a spammer tries to automagically inject a comment. The thing is I can't generate this error even when I hit the htsrv/comment_post.php file directly from a [url=http://www.microsoft.com/windows/products/winfamily/ie/default.mspx]crappy little browser[/url]. So to me that means it is coming from spammers, though obviously I could be way wrong.

Oh and unlike gupik, I am seeing this in my server-generated error log. I am not seeing it actually live on my blog.


Form is loading...