I've seen this bug in version 6.x-1.1 and 6.x-1.2. (Since there's no option for the 6.x versions in the select box, I'm reporting this against HEAD)

I'm NOT running PHP 5, and I suspect this is the root of this bug I get when I create a new node and select 'crosspost to LJ':

Fatal error: Unsupported operand types in /var/misc/httpd/domesticat.net/html/includes/common.inc on line 1435

Nodes save correctly if the option is unchecked.

CommentFileSizeAuthor
#2 ljxp_operandtype.patch774 bytesvalthebald

Comments

domesticat’s picture

Some updates. I'm about 99% sure I know where the bug is coming from, but I'm not certain how the code should be edited to make it right.

Moving to PHP 5 made no difference, so I ruled it out.

Comment #1 on this page - http://drupal.org/node/254864 - suggested that this error involved a bad call to the l() function in common.inc.

I started checking for instances of the l() function in the ljxp module -- there were only 5 -- and comparing it against my options. Sure enough, the one on line 442 looked like it had the wrong number and type of parameters:

$message['event'] .= l(t('Read the rest of this post'), $dest, NULL, NULL, NULL, TRUE);

Compare that to line 1430 in common.inc:

function l($text, $path, $options = array()) {

Seems pretty clear -- the function's expecting three parameters, and the last one should be an array. The instance on line 442 has six, and no array.

As a test, I switched my option for teaser handling, and new nodes were published to livejournal with no problems.

Looks like it's a one-line fix.

valthebald’s picture

Version: master » 6.x-1.3-1
Assigned: Unassigned » valthebald
Status: Active » Needs review
StatusFileSize
new774 bytes

I beleive you're right.
Attached is one line patch that should fix the problem.
Since I can't reproduce the problem, I can't tell for sure. If your problem would be solved, please tell me and I include this patch into the next release.
Regards,
http://www.valthebald.net

Correct line 442:
$message['event'] .= l(t('Read the rest of this post'), $dest, array('absolute' => TRUE));

domesticat’s picture

Status: Needs review » Reviewed & tested by the community

I tested the patch - it works as promised.

The only way to trigger the bug was to have the "post only a teaser" option selected.

I marked the patch as reviewed & tested. I think we can call this solved.

valthebald’s picture

Status: Reviewed & tested by the community » Closed (fixed)

I've applied this patch and released new version (6.x-1.3-2). Thanks for your help