2

hi suddenly i started to get Fatal error: Unsupported operand types in E:\localhost\htdocs\drupal\modules\field\field.info.class.inc on line 479

any page i visit just display this error

how to fix this ?

1
  • this is not enough information.. it's probably a module issue, or perhaps something in your template.php file. you should try to turn off modules to see if it goes away. – jdu Feb 10 '14 at 20:13
4

The problem here is that in the given file, the line

$field['settings'] += field_info_field_settings($field['type']);

fails (i.e line 479), because field_info_field_settings() doesn't return an array. This shouldn't happen and it is probably caused by a custom or contrib module or by faulty data in your database.

You can try to trace the error down. Open field.info.class.inc in a text editor and put the following code directly above the line 479:

$field_settings = field_info_field_settings($field['type']);
if (!is_array($field_settings)) {
  print_r($field);
  die();
}

Then load a page where you would normally get that error and look at the printed details (I hope there are any). Then ask yourself the following questions:

  • For which field are the settings requested?
  • Does this field still exists?
  • Is it a field declared by a module that you have disabled?

This should help you to trace down the problem.

Remember to remove the debug code!

4
  • Thx, tried that out .. and the error seems to come from "simplead" module – Zorox Feb 11 '14 at 6:17
  • 1
    @Barjas Can you give some more information? Is the module still enabled? Which version? And so on, some details ... – berliner Feb 11 '14 at 8:22
  • honestly i didn't do lot of debug, looks like the problem started after i installed the simpleAds 7.x-2.x-dev. so i went and uninstalled it manually (since the admin page was not accessible cause of the error) and the website is working fine now. then i installed the simpleads 7.x-1.x-dev. which caused NO problems :) – Zorox Feb 11 '14 at 8:33
  • 1
    @Barjas ok, fine then, problem solved ;) – berliner Feb 11 '14 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.