Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatability issue when using DebugKit #1

Open
denegen opened this issue Jun 28, 2010 · 0 comments
Open

Compatability issue when using DebugKit #1

denegen opened this issue Jun 28, 2010 · 0 comments

Comments

@denegen
Copy link

denegen commented Jun 28, 2010

DebugKit uses a Model called ToolbarAccess which extends directly from object. This produces an error when trying to call Model::Behaviors->attached():

Notice: Undefined property: ToolbarAccess::$Behaviors in C:\xampp\htdocs___\app\plugins\searchable\vendors\shells\build_search_index.php on line 157

Fatal error: Call to a member function attached() on a non-object in C:\xampp\ht
docs___\app\plugins\searchable\vendors\shells\build_search_index.php on
line 157

As a fix I added a line before searchable\vendors\shells\build_search_index.php line 157:

  // If Searchable not attached or Model does not extend Model, skip
  $Model = ClassRegistry::init($modelName);
  if ( !is_a( $Model, 'Model' ) || !$Model->Behaviors->attached('Searchable')) {
    continue;
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant