2fd457
2fd457
Workaround for:
2fd457
2fd457
 https://bugzilla.redhat.com/show_bug.cgi?id=747361
2fd457
2fd457
--- REST.php.restcache
2fd457
+++ REST.php
2fd457
@@ -234,6 +234,13 @@
2fd457
             }
2fd457
         }
2fd457
 
2fd457
+        if (!is_writeable($cache_dir)) {
2fd457
+            // If writing to the cache dir is not going to work, silently do nothing.
2fd457
+            // An ugly hack, but retains compat with PEAR 1.9.1 where many commands
2fd457
+            // work fine as non-root user (w/out write access to default cache dir).
2fd457
+            return true;
2fd457
+        }
2fd457
+
2fd457
         if ($cacheid === null && $nochange) {
2fd457
             $cacheid = unserialize(implode('', file($cacheidfile)));
2fd457
         }