svn: /pear2/Pyrus/trunk/src/Pyrus/Registry/ Sqlite3.php
| From: | Brett Bieber | Date: | Thu, 22 Jul 2010 15:46:15 +0000 |
| Subject: | svn: /pear2/Pyrus/trunk/src/Pyrus/Registry/ Sqlite3.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-9599@lists.php.net to get a copy of this message | ||
saltybeagle Thu, 22 Jul 2010 15:46:15 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=301472
Log:
Readability. Replace ternary conditional.
Changed paths:
U pear2/Pyrus/trunk/src/Pyrus/Registry/Sqlite3.php
Modified: pear2/Pyrus/trunk/src/Pyrus/Registry/Sqlite3.php
===================================================================
--- pear2/Pyrus/trunk/src/Pyrus/Registry/Sqlite3.php 2010-07-22 14:41:13 UTC (rev 301471)
+++ pear2/Pyrus/trunk/src/Pyrus/Registry/Sqlite3.php 2010-07-22 15:46:15 UTC (rev 301472)
@@ -1408,8 +1408,15 @@
$file = $path;
while ($file && $file !== '.' && $file !== '/'
&& !is_writable($file)) {
- $file = dirname($file) === $file? false : dirname($file);
+
+ if (dirname($file) === $file) {
+ $file = false;
+ break;
+ }
+
+ $file = dirname($file);
}
+
if (!$file || $file == '.') {
throw new Exception('Cannot create SQLite3 registry, registry is read-only');
}