Fatal error: Unsupported operand types in /hsphere/local/home/...../profiles/recruiter/modules/date/date_all_day/date_all_day.module on line 386

Comments

karens’s picture

Status: Active » Postponed (maintainer needs more info)

Unable to replicate this. I need more information about what you were doing when you got the message. Also, did you run update.php? And did you clear the caches?

vikingew’s picture

I also get this, after updating the module to latest dev and run update.php sucessfully, no matter returning to Admin or Frontpage results in a blank page and the above print in apache error log, except I get line 388 instead of 386 - and it's odd because that line just contains

);

and line 386 contains nothing unusual either, so it's all very strange...

kaizerking’s picture

Just installed and ran update.php got this error core is fresh install

drzraf’s picture

( ! ) Fatal error: Unsupported operand types in /drupal/sites/all/modules/date/date_all_day/date_all_day.module on line 388
Call Stack
#	Time	Memory	Function	Location
1	0.0016	837200	{main}( )	../update.php:0
2	0.7293	48096528	update_fix_compatibility( )	../update.php:430
3	0.7296	48121000	update_check_incompatibility( )	../update.inc:28
4	0.7459	47420344	system_rebuild_module_data( )	../update.inc:52
5	0.7459	47420808	_system_rebuild_module_data( )	../system.module:2429
6	0.9470	47761864	drupal_alter( )	../system.module:2401
7	0.9470	47762080	field_system_info_alter( )	../module.inc:1017
8	0.9491	47905232	l( )	../field.module:408
9	0.9491	47906200	theme_get_registry( )	../common.inc:2341
10	0.9491	47906440	call_user_func_array ( )	../theme.inc:263
11	0.9491	47907184	_theme_load_offline_registry( )	../theme.inc:263
12	0.9491	47907184	_theme_build_registry( )	../theme.maintenance.inc:91
13	1.2098	60910184	_theme_process_registry( )	../theme.inc:660
14	1.2099	60949392	views_theme( )	../theme.inc:508
15	1.2099	60962552	views_fetch_plugin_data( )	../views.module:95
16	1.2103	61016280	_views_fetch_plugin_data( )	../views.module:1176
17	1.2343	63551272	views_discover_plugins( )	../cache.inc:97
18	1.2352	63574456	entity_views_plugins( )	../plugins.inc:391
19	1.2352	63574456	views_fetch_data( )	../entity.views.inc:286
20	1.2353	63574696	_views_fetch_data( )	../views.module:1165
21	1.2360	63575792	module_invoke_all( )	../cache.inc:30
22	1.2603	63727616	call_user_func_array ( )	../module.inc:818
23	1.2603	63727984	entity_views_data( )	../module.inc:818
24	1.2603	63728296	entity_crud_get_info( )	../entity.views.inc:23
25	1.2603	63728608	entity_get_info( )	../entity.module:493
26	1.3716	66763368	drupal_alter( )	../common.inc:7378
27	1.3907	66936392	file_styles_entity_info_alter( )	../module.inc:1017
28	1.3954	67000328	file_styles_display_info_defaults( )	../file_styles.module:207
29	1.3954	67001304	file_displays_load( )	../file_styles.module:185
30	1.3977	67432432	file_info_formatter_types( )	../file_entity.file_api.inc:382
31	1.3977	67433128	module_invoke_all( )	../file_entity.file_api.inc:78
32	1.3981	67435496	call_user_func_array ( )	../module.inc:818
33	1.3981	67435864	file_entity_file_formatter_info( )	../module.inc:818
34	1.3981	67436176	field_info_formatter_types( )	../file_entity.module:321
35	1.3981	67436256	_field_info_collate_types( )	../field.info.inc:521
36	1.4063	67623968	drupal_alter( )	../field.info.inc:124
37	1.4066	67629856	date_all_day_field_widget_info_alter( )	../module.inc:1017
drzraf’s picture

with var_dump($info['date_select']['settings']);die(); at the beginning of date_all_day_field_widget_info_alter :

array
  'input_format' => string 'd/m/Y - H:i:s' (length=13)
  'input_format_custom' => string '' (length=0)
  'increment' => int 15
  'text_parts' => 
    array
      empty
  'year_range' => string '-3:+3' (length=5)
  'label_position' => string 'above' (length=5)
  'repeat_collapsed' => int 0
drzraf’s picture

the above comment is dumb, I should have said that $info['date_popup'] is NULL

vikingew’s picture

This si a strange error indeed and although $info['date_popup'] is NULL due to this code in date.field.inc

function date_field_widget_info() {
  ...
  if (module_exists('date_popup')) {
    $info['date_popup'] = array(
      'label' =>  t('Pop-up calendar'),
      'field types' => array('date', 'datestamp', 'datetime'),
    ) + $settings;
  }
  return $info;
}

I cannot see any syntactic problem with the error producing code as the array elements should simply be created, afaik but I'm no php guru so maybe I have got it wrong.

I noted something else though experimenting by simply remove obstructive code bit and I still got a blank page, but this time nothing was added to the error log and access log just produced 1 line as

[15/Dec/2011:17:36:22 +0000] "GET /?q=admin HTTP/1.1" 500 -

This indicates to me that the actual error is elsewhere and more something in style with white space after a closing ?>

I rolled back to a previous snapshot and got it working again, then reapplied all module updates except date and all still working, so it must be with one of the new date files I assume. I will experiment further from there and see what i can find.

vikingew’s picture

I reapplied the latest dev but removed the 7002 update function that activates the date_all_day module and the site loads fine. But as soon as the module is activated it's back to blank page.

vikingew’s picture

Ok so if Date Popup module is enabled it works to also enable Date All day, which means as code is now that the latter one depends on the former, and this is probably why some can't reproduce this.

EDIT: Unfortunately it appears as I was wrong, back to blank again and it doesn't even help to restore db backup with module disabled, a db that site worked when dumped.

rickmanelius’s picture

I commented out lines 386-388. Refreshed the page, then uncommented... all works!

Odd. It seems that something isn't set the first time this function is loaded/called.

rickmanelius’s picture

I spoke to soon. It came back upon flushing the cache system through the admin menu.

SirFiChi’s picture

Same here.
Update with drush up and i get a blank site with:
Fatal error: Unsupported operand types in /sites/all/modules/date/date_all_day/date_all_day.module on line 386

Commenting out 386-388 brings the page back, so you are able to disable Date All Day...

karens’s picture

No one actually said this, but does everyone having this problem have the Date Popup module disabled?

karens’s picture

Status: Postponed (maintainer needs more info) » Fixed

I'm assuming that was the problem, committed a fix.

http://drupalcode.org/project/date.git/commit/8be3713

kaizerking’s picture

@#13, In my case the date pop up was in disabled condition.

kaizerking’s picture

Fixed error with the latest commit thanx

Status: Fixed » Closed (fixed)

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