ZF-11845: Wrong file permission in Zend_Search_Lucene
Description
protected static $_defaultFilePermissions = '0777';
is a string, should be integer or you should use octdec() to convert when using file permissions in fopen
see: http://de.php.net/manual/de/function.chmod.php (comments)
Comments
Posted by Adam Lundrigan (adamlundrigan) on 2011-10-26T16:38:43.000+0000
What version of Zend Framework are you using?
Could you please specify the file you found this in. When searching against trunk, the only file I could find {{$_defaultFilePermissions}} in was {{Zend_Search_Lucene_Storage_Directory_Filesystem}}, and it has it's value (0666) initialized properly (ie: not a string).
Posted by Dirk Schwarz (blacky1707) on 2011-10-27T06:44:50.000+0000
I'm using version 1.11.11 and the revision of the file Filesystem.php is: 23964. The class is Zend_Search_Lucene_Storage_Directory_Filesystem and in the version I have, the variable is defined as
protected static $_defaultFilePermissions = '0777';
Posted by Dirk Schwarz (blacky1707) on 2011-10-27T06:46:45.000+0000
BTW, the function getDefaultFilePermissions() is considered to return integer, but returns a string
Posted by Adam Lundrigan (adamlundrigan) on 2011-10-27T18:09:50.000+0000
Are you sure something hasn't changed locally in your ZF copy? Looking into the release-1.11.11 svn tag, that file at r23964 looks like this: http://framework.zend.com/code/filedetails.php/…
An interesting thing I came across while researching this is that the release-1.11.11 file is at r23964, but the same file in trunk is at r23906 (see here)
Posted by Dirk Schwarz (blacky1707) on 2011-10-28T07:02:28.000+0000
Yes, I'm sure. We are working with symlinks and a centralized copy of ZF. The Version is 1.11.11 (FULL) which was downloaded on 29th of September 2011 (day of the release). I'm downloading the latest version and going to doublecheck the file.
Posted by Dirk Schwarz (blacky1707) on 2011-10-28T07:42:39.000+0000
Looks like the file I downloaded on 29th of October is different from the current version I downloaded a few minutes ago. But the file Version.php contains 1.11.11 with r24483 WTF??? ;-)
Posted by Adam Lundrigan (adamlundrigan) on 2011-10-28T13:45:22.000+0000
That is unusual. I can't recall exactly when I downloaded my local copy of 1.11.11 full release, but it has the correct file (library/Zend/Search/Lucene/Storage/Directory/Filesystem.php @ r23964). Do you still have the archive file you downloaded on Sept 29th?
-In the meantime, I'll look into the trunk vs. release-1.11.11 issue to find out why trunk has an older revision of library/Zend/Search/Lucene/Storage/Directory/Filesystem.php- This is just due to the fact that there was a length of time between commit to trunk (r23906) and merging to release (r23964).