-
Notifications
You must be signed in to change notification settings - Fork 23
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
Zend_Translate issues 'failed to open stream' warning when using a custom adapter #46
Comments
@g10-fred, no the error comes from Zend/Loader: You should stop using Zend_Loader and stick with the composer autoloader. The zf1s/zf1 project is intended to use composer autoloader. @falkenhawk is it covered anywhere how to stop using Zend_Loader? |
@glensc I haven't covered any instructions about moving away from Zend_Loader myself. However here a reproduction (and/or a stacktrace) from @g10-fred would be great - why it fails, is it a combination of wrong options passed or is it triggered from the zf1 internals somewhere. Anyway, |
We have simply have a custom Zend_Translate_Adapter class and we pass the name of the class to Zend_Translate in a Controller Plugin. Something like: Here's a stack trace: |
related commit which might have caused this issue 76477fb - logic with class_exists must be changed in such cases so it does not trigger a warning, but also not throw an exception, when |
Issue is on line 130 of class Zend_Translate, the 'class_exists' function is attempting to autoload a custom adapter as a 'Zend_Translate_Adapter_' and issues a warning when it is not found:
PHP Warning: include_once(Zend/Translate/Adapter/Custom/Translate/Adapter.php): failed to open stream: No such file or directory in /var/www/comm-os/vendor/zf1s/zend-loader/library/Zend/Loader.php on line 134
Requires the 'autoload' parameter of the class_exists function to be set to false.
The text was updated successfully, but these errors were encountered: