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