Using Drupal 6.3

I create a new webform, on submission of the webform I get the White Screen of Death. My logs show the following error.

PHP Fatal error: Unsupported operand types in /var/www/vhosts/example.com/includes/common.inc on line 1265, referer: http://example.com/node/add/webform

Comments

jrglasgow’s picture

on looking into this further I see that the string of code in common.inc is in the url() function.

The url function changed from D5 to D6
D5 usage

url($path = NULL, $query = NULL, $fragment = NULL, $absolute = FALSE)

D6 usage

url($path = NULL, $options = array())

the error appears to be coming at the concatenation of defaults to the $options array

<?php
function url($path = NULL, $options = array()) {
  // Merge in defaults.
  $options += array(
    'fragment' => '',
    'query' => '',
    'absolute' => FALSE,
    'alias' => FALSE,
    'prefix' => ''
  ); // <---- this is the line 1265 in the error message

?>
jrglasgow’s picture

Project: Webform » Akismet
Version: 6.x-2.1.1 » 6.x-1.0-beta1

This error, only happening on submission of webform node, is actually being caused by akismet module

jrglasgow’s picture

I've used grep to track down the offending lines of code:

./akismet/akismet.module:1026:      '!content-link' => url('node/'. $content->nid, NULL, 'comment-'. $content->cid, TRUE)
./akismet/akismet.module:1034:      '!content-link' => url('node/'. $content->nid, NULL, NULL, TRUE)
./akismet/akismet.module:1547:    $comment_data['permalink'] = url('node/'. $content->nid, NULL, 'comment-'. $content->cid, TRUE);
jrglasgow’s picture

Status: Active » Fixed

I was going to make a patch but it has already been fixed in HEAD

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.