Issue Type: Bug Created: 2009-08-04T02:15:22.000+0000 Last Updated: 2009-08-12T10:39:04.000+0000 Status: Resolved Fix version(s): - 1.9.1 (11/Aug/09)
Reporter: Rob Allen (rob) Assignee: Ralph Schindler (ralph) Tags: - Zend_Tool
Related issues: - ZF-7515
Attachments:
When I run zf show version on Windows, I get this notice:
PHP Notice: Undefined index: STORAGE_DIR in C:\www\zf-trunk\bin\zf.php on line 70 PHP Stack trace: PHP 1. {main}() C:\www\zf-trunk\bin\zf.php:0 PHP 2. zf_main() C:\www\zf-trunk\bin\zf.php:23 PHP 3. zf_setup_storage_directory() C:\www\zf-trunk\bin\zf.php:32 Zend Framework Version: 1.9.0a1
(Xdebug installed - also happens if Xdebug isn't installed.)
I tested trunk and release-1.9 and both have this problem.
Posted by Rob Allen (rob) on 2009-08-04T03:48:10.000+0000
Suggested patch:
<pre class="highlight">
Index: bin/zf.php
===================================================================
--- bin/zf.php (revision 17369)
+++ bin/zf.php (working copy)
@@ -66,13 +66,15 @@
} elseif (isset($_zf['HOME']) && file_exists($_zf['HOME'] . '/.zf/')) {
$_zf['STORAGE_DIR'] = $_ENV['HOME'] . '/.zf/';
}
-
- $storageRealpath = realpath($_zf['STORAGE_DIR']);
-
- if ($storageRealpath) {
- $_zf['STORAGE_DIR'] = $storageRealpath;
- } else {
- unset($_zf['STORAGE_DIR']);
+
+ if(isset($_zf['STORAGE_DIR'])) {
+ $storageRealpath = realpath($_zf['STORAGE_DIR']);
+
+ if ($storageRealpath) {
+ $_zf['STORAGE_DIR'] = $storageRealpath;
+ } else {
+ unset($_zf['STORAGE_DIR']);
+ }
}
}
Posted by Ryan Schmidt (ryandesign) on 2009-08-06T14:50:50.000+0000
Not Windows-specific. Happens on Mac OS X, too, with 1.9.0 final. Did not happen with 1.8.4PL1.
Posted by Matt Cockayne (matt.cockayne) on 2009-08-08T04:22:07.000+0000
Also Occured using final version of 1.9 on a CentOS 5.2, apache 2, php 5.2.9, with ioncude, Zend ext Manager and Optimizer. Suggested patch resolves
Posted by Peter Sharp (stryks) on 2009-08-10T06:03:42.000+0000
Patch effective for vanilla install of Apache 2, PHP 5.3 under Windows (XP & 7). Nice work.
Posted by Ralph Schindler (ralph) on 2009-08-10T10:18:18.000+0000
Fixed in trunk in r17522 and 1.9 release branch in r17524
Posted by Ralph Schindler (ralph) on 2009-08-12T10:39:04.000+0000
Updating fix information