cvs: php-src(PHP_4_3) /ext/session/tests skipif.inc
| From: | Ilia Alshanetsky | Date: | Thu, 13 May 2004 12:53:49 +0000 |
| Subject: | cvs: php-src(PHP_4_3) /ext/session/tests skipif.inc | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-27334@lists.php.net to get a copy of this message | ||
iliaa Thu May 13 08:53:49 2004 EDT
Modified files: (Branch: PHP_4_3)
/php-src/ext/session/tests skipif.inc
Log:
MFH: Skip session tests if session.save_path is not writable.
http://cvs.php.net/diff.php/php-src/ext/session/tests/skipif.inc?r1=1.2&r2=1.2.2.1&ty=u
Index: php-src/ext/session/tests/skipif.inc
diff -u php-src/ext/session/tests/skipif.inc:1.2 php-src/ext/session/tests/skipif.inc:1.2.2.1
--- php-src/ext/session/tests/skipif.inc:1.2 Thu Oct 3 11:11:01 2002
+++ php-src/ext/session/tests/skipif.inc Thu May 13 08:53:49 2004
@@ -7,4 +7,13 @@
if (!extension_loaded("session")) {
die("skip\n");
}
+$save_path = ini_get("session.save_path");
+if (!@is_writable($save_path)) {
+ if (($p = strpos($save_path, ';')) !== false) {
+ $save_path = substr($save_path, ++$p);
+ }
+ if (!@is_writable($save_path)) {
+ die("skip\n");
+ }
+}
?>