Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Trivial
-
Resolution: Fixed
-
Affects Version/s: 1.5.0
-
Fix Version/s: 1.8.0
-
Component/s: Zend_Loader
-
Labels:None
-
Fix Version Priority:Must Have
Description
If you're running the PHP application in strict mode and the file you wish to check for readability does not exist, an warning is given by PHP.
In my case this occurred if you validate a xyz@domain.net eMail address since in the folder "Hostname" is no file for .net domains.
A trivial fix would be:
if (!file_exists($filename) || !$fh = @fopen($filename, 'r', true)) {
instead of:
if (!$fh = @fopen($filename, 'r', true)) {
Issue Links
| This issue is dependecy of: | ||||
| ZF-3170 | include_path problem |
|
|
|
| ZF-3249 | Use of fopen with '@' triggers error-handler |
|
|
|
| ZF-2959 | Zend_Loader::isReadable() keeps file handles open |
|
|
|
| ZF-2701 | Zend_Loader::isReadable triggers E_WARNING with user defined helper paths |
|
|
|
| ZF-4057 | Zend Loader produces a lot of unnecessary "file not found" warnings |
|
|
|
| ZF-4209 | Zend_Cache::isReadable() keeps file handles open |
|
|
|
Can you tell me whether or not we also should fix Zend_Cache::_isReadable ?
It seems Zend_Cache has same problem.