ZF-11959: No such file or directory: Zend\Gdata\Calendar\Extension\EventQuery.php
Description
Please see this bug, i think it's a regression bug http://framework.zend.com/issues/browse/…
Accessing google calendar my error log gives me include_once(Zend\Gdata\Calendar\Extension\EventQuery.php) [function.include-once]: failed to open stream: No such file or directory in C:\www\www\gestionale\library\Zend\Loader.php : 146
include_once() [function.include]: Failed opening 'Zend\Gdata\Calendar\Extension\EventQuery.php' for inclusion (include_path='C:\www\www\gestionale\application/../library;C:\www\www\gestionale\library;.;C:\php\pear') in C:\www\www\gestionale\library\Zend\Loader.php : 146 but the application works anyway.
I am using Windows 7 environment, so it is not a case sensitive problem
Comments
Posted by Adam Lundrigan (adamlundrigan) on 2012-02-26T07:09:38.000+0000
Could you provide some code which reproduces your issue?
There is not {{Zend_Gdata_Calendar_Extension_EventQuery}} class in the framework. There is, however, a {{Zend_Gdata_Calendar_EventQuery}} class.
Posted by Maxim Postoronca (max4ever) on 2012-02-27T17:28:24.000+0000
Posted by Adam Lundrigan (adamlundrigan) on 2012-02-28T03:51:26.000+0000
Could you please provide a use case example? A small snippet of the framework code without a file name and line number doesn't really help narrow down where the problem is coming from.
Posted by Jurgens du Toit (jrgns) on 2012-06-03T12:44:19.000+0000
You can try the following code
It was reported on StackOverflow
Posted by Jurgens du Toit (jrgns) on 2012-06-03T13:35:30.000+0000
I did some digging.
In Zend/Gdata/App.php version 1.11.11, lines 1047 to 1058:
The class relies on the loader to throw a Zend_Exception if the file / class it tries to load doesn't exist, or just suppresses the error with the
@symbol.Simplified, I have the following code:
This clearly doesn't honour the error suppression, and produces the above mentioned error.
This can be fixed for a lot of users by also catching the
ErrorExceptionand doing nothing with it, just like theZend_Exception.Posted by Adam Lundrigan (adamlundrigan) on 2012-06-04T12:43:29.000+0000
The simpler fix would be to not throw (non-fatal) E_NOTICE raises as (fatal) ErrorException. That said, I don't see any problem with catching and ignoring ErrorException here, as chances are that if the file being loaded has errors we're not going to want to use it anyway.
Posted by Adam Lundrigan (adamlundrigan) on 2012-06-04T13:02:11.000+0000
I've attached a fix and unit test that implements the suggested workaround. Personally, I would prefer that end users not throw E_NOTICE as an exception, but that's just me. I'll leave it up to the maintainer of Zend_Gdata or the CR Team to decide if the patch should be applied to the next release.
Posted by Jurgens du Toit (jrgns) on 2012-06-22T09:32:43.000+0000
Not throwing an exception for notices makes sense, but I see in the ZF2 code they cover all their bases just by catching the base Exception class.
It might be a better (simpler) solution than the one I proposed.
Posted by Rob Allen (rob) on 2012-11-03T14:06:28.000+0000
Patch applied on trunk (25062) and release-1.12 (25063)
Posted by Nate Nolting (withremote) on 2013-02-19T19:32:25.000+0000
This error still exists in 1.12.1 Zend_Gdata