Upon navigating to /admin/build/features/features-override/add to add an override, an error can occur:

Array
(
[type] => 1
[message] => Cannot use object of type __PHP_Incomplete_Class as array
[file] => /path/to/drupal/sites/all/modules/features_override/features_override.module
[line] => 343
)

In my case, the incomplete class was views_display, and adding a line with module_load_include('inc', 'views', 'includes/view'); could have fixed my specific error, but I don't know your code well enough to figure out every module that might need to be loaded to avoid this error.

Instead, I switched your is_object checks to is_array checks. I've included a patch.

Comments

nedjo’s picture

Some views-related issues may be because views has been in flux and Features is working to catch up. See e.g. #1157048: Feature-packages appear overridden when they are not and #1097560: Features incompatible with the latest version of views. Probably worth trying with the dev version of Features.

Can this be reproduced in D7?

a1russell’s picture

I'm honestly not sure how to reproduce my own problem on another environment, as I don't know exactly what triggers it. I did try to set up a D7 environment to trigger this error again, but I didn't have any luck. This bug *might* be fixed (or it might not).

Since you know the code better than I do, would you mind taking a look at my patch? It is a pretty simple change to look at. If you read up on this type of error, I don't think that it is an issue with Views or Features, but rather Features Override. Can you guarantee that at this point in the code, all of the objects being checked will be "complete"?

zeip’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Drupal 6 is no longer supported, closing the issue since it hasn't been reproduced on the D7 version. Feel free to re-open if this still happens for a current version.