Imagine loader #3

Merged
merged 3 commits into from May 16, 2012

3 participants

@bfncs

Since the loading on *nix still doesn't work for me, I think this fixes #1.
This is exactly what rookian1337 pointed out on issue #1 and it seems to do the job. I just don't now how to attach this pull request to #1.

@burzum burzum merged commit 4872912 into burzum:develop May 16, 2012
@huguesalary

Hi,

I have this exact problem on both the latest master and latest develop branch. I'm working on Mac OS X 10.6.8, PHP 5.3.1, CakePHP 2.0.

Any idea what could be the problem?

Thanks in advance,
-Hugues

Here is the stack trace:

( ! ) Fatal error: Class 'Imagine\Gd\Imagine' not found in /Volumes/CaseSensitiveFS/cakephp/app/Plugin/Imagine/Model/Behavior/ImagineBehavior.php on line 46
Call Stack
#   Time    Memory  Function    Location
1   0.0044  343136  {main}( )   ../index.php:0
2   0.1290  2110108 Dispatcher->dispatch( ???, ???, ??? )   ../index.php:92
3   0.1418  2910760 Dispatcher->_invoke( ???, ???, ??? )    ../Dispatcher.php:85
4   0.1545  3721060 Controller->invokeAction( ??? ) ../Dispatcher.php:103
5   0.1545  3721616 ReflectionMethod->invokeArgs( ???, ??? )    ../Controller.php:485
6   0.1545  3721632 PhotosController->feed( )   ../PhotosController.php:485
7   0.1545  3721788 Controller->__get( ??? )    ../Controller.php:37
8   0.1545  3721788 Controller->__isset( ??? )  ../Controller.php:404
9   0.1546  3721816 Controller->loadModel( ???, ??? )   ../Controller.php:366
10  0.1555  3795700 ClassRegistry::init( ???, ??? ) ../Controller.php:734
11  0.1663  4739772 ReflectionClass->newInstance( ??? ) ../ClassRegistry.php:156
12  0.1664  4747188 Model->__construct( ???, ???, ??? ) ../Model.php:156
13  0.1678  4820088 BehaviorCollection->init( ???, ??? )    ../Model.php:725
14  0.1748  5368884 BehaviorCollection->load( ???, ??? )    ../BehaviorCollection.php:68
15  0.1758  5422676 ImagineBehavior->setup( ???, ??? )  ../BehaviorCollection.php:148
@huguesalary

Back on my problem, it seems like the problem comes from the fact that the bootstrap.php file in the Config directory of the plugin does not get loaded.
It must come from a configuration issue on my end. If ever someone have an idea of what I could be missing, I'd be happy.
Thanks!
-H

@huguesalary

Okay, if anybody comes here, my error was to call in the app/Config/bootstrap.php

CakePlugin::load('Imagine');

instead of

CakePlugin::load('Imagine',array("bootstrap"=>true)); //That works!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment