PHP Fatal Error on submission of webform
jrglasgow - July 15, 2008 - 14:34
| Project: | Akismet |
| Version: | 6.x-1.0-beta1 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
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

#1
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
$optionsarray<?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
?>
#2
This error, only happening on submission of webform node, is actually being caused by akismet module
#3
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);
#4
I was going to make a patch but it has already been fixed in HEAD
#5
Automatically closed -- issue fixed for two weeks with no activity.