I'm currently working on Views 6.x-2.16. I very frequently get the following fatal error when clearing caches:

PHP Fatal error:  view::destroy() [<a href='view.destroy'>view.destroy</a>]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition &quot;views_plugin_display_default&quot; of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition  in obfuscated/views/includes/view.inc on line 1611

I suspect that this is due to an incompatibility with autoload. Some how, views attempts to destroy a view object that has an incomplete handler. A simple change to the destroy() method prevents this. Patch forthcoming.

#1 views-destroy_autoload-2040281-1.patch1.01 KBgrasmash
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es).
[ View ]


Status:Active» Needs review
new1.01 KB
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es).
[ View ]

Attaching patch rolled against 6.x-2.x-dev

Title:Views PHP Fatal error: view::destroy() on cache clear when autoload enabledViews PHP Fatal error: view::destroy() on cache clear when autoload enabled
Component:Miscellaneous» Code
Status:Needs review» Reviewed & tested by the community

This makes sense and seems to solve the problem without any potential for adverse side effects that I perceive.