Closed (duplicate)
Project:
Flag
Version:
6.x-1.1
Component:
Flag core
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Oct 2009 at 02:04 UTC
Updated:
8 Aug 2011 at 18:40 UTC
Jump to comment: Most recent
I get a error when I visit certain URL's like: node/add/blog or: civicrm/user
Fatal error: Unsupported operand types in /home/ps/prostaker/includes/common.inc on line 1542
Is the error I get when going to those URL's. I havent performed any major changes in the theme - Im using a subtheme from zen's starter kit, and I tried my drupal installation with 2 different themes where I dont run into this error; garland and a custom made theme works good. I run drupal 6.12 with quite a lot of modules.
Would be grateful for some advice here.
Regards
Comments
Comment #1
Grayside commentedI appear to have nearly the same problem on my one site with Zen.
PHP Fatal error: Unsupported operand types in /home/drupal/drupal-6.14/includes/common.inc on line 1416Line 1416 is the very last line of the following block, based on other 5.3 errors, I'm thinking it is the "+=" assignment of an array.
Checking the Zen codebase for url() calls, a quick search turned up
zen/template.theme-registry.incon line 33, but removing the url() call did not appear to change anything.Commenting out the merging code eliminates the error. (And exposes all the non-Zen PHP 5.3 troubles!)
EDIT: An even *better* core hack to fix this:
The first array element is in the same line as the array declaration.
Comment #2
unikum commentedhttp://www.bekirdag.com/en/drupal/commoninc_fatal_error_problem_on_line_...
Comment #3
int commentedI have the same error when i visit /admin/help page
Fatal error: Unsupported operand types in /(...)/includes/common.inc on line 1416change this: (common.inc start line 1410)
to this:
Comment #4
Anonymous (not verified) commentedThe above hack breaks flag's links:
Parameter 1 to flag_flag_link() expected to be a reference, value given in ***/includes/module.inc on line 462.
Comment #5
madwalo commentedi did this:
if(is_array($options)){
$options += array(
'fragment' => '',
'query' => '',
'absolute' => FALSE,
'alias' => FALSE,
'prefix' => ''
);
}
Comment #6
darkodev commentedUsing the debug_print_backtrace() trick from http://justinhileman.info/articles/unsupported-operand-types-in-drupal-6x, I found that flag module was breaking url() with a null argument:
#0 url(, ) called at [/home/cjbs/public_html_new/trunk/sites/all/modules/flag/flag.module:1092
Implementing #5 above works.
Now to find why flag module is broken all of a sudden so I can remove the core hack . . .
Comment #7
dpearcefl commentedDo you still need help?
Comment #8
dpearcefl commentedComment #9
omar alahmed#5 works perfectly, thanks very much.
Comment #10
dpearcefl commentedThis is not really an issue with Drupal core but is a problem with the Flag module (see #6).
This issue duplicates this issue: #459994: Crash when rendering url() (PHP 5.3 compatibility)