| Project: | ProjectPier |
| Version: | 0.8.8-stable |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | HappyDog |
| Status: | closed - fixed |
Jump to:
Currently there are three files in the cache directory that are distributed as part of the release tarball:
* /cache/autoloader.php
* /cache/log.php
* /cache/trace.txt
These files ship as empty place-holder files, but will be written to by the application in certain situations. This causes problems with revision control, as the files show up as 'modified' and may end up being committed to the source repository. This is not just a problem in the main ProjectPier repository, but it has down-stream implications too (we keep a vendor repository to manage deployment of third-party code).
The code already creates these files automatically if they don't already exist, but there are a couple of places where errors may be raised if they are not present. The attached patch file (against 0.8.8 SP2) contains the necessary modifications to remove these errors:
* When including the autoloader.php, we suppress errors using @ prior to the fopen() statement.
* The __production_error_handler() was logging all errors (except E_STRICT), even if they were deliberately suppressed using @. This patch updates the function so that it ignores suppressed errors. I've also added a comment to explain what 2048 means, and why the E_STRICT constant isn't being used.
| Attachment | Size |
|---|---|
| cache_dir_tidy.patch | 1.26 KB |
Forgot to mention (though it's probably obvious), you also need to delete the three files, listed above, when you apply the above patch.
I have created a pull request on GitHub containing this patch. Hopefully it will be applied to the main repository soon!
Pull request merged into main development branch.
Commit: http://github.com/phpfreak/Project-Pier/commit/4d58a114e88786431207b9eb2d5dad44b2734e83
Merge: http://github.com/phpfreak/Project-Pier/commit/72dbeaa1301b9eebd37a5dd2e3e2f249f642210a
Resolved: FIXED