svn: /pear2/Pyrus/trunk/src/Pyrus/Registry/ Sqlite3.php
[email protected] (Brett Bieber) Thu, 22 Jul 2010 15:46:15 +0000
| Newsgroups | php.pear.cvs,php.pear.core |
|---|---|
| Message-ID | <[email protected]> |
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');
}