]> granicus.if.org Git - php/commitdiff
Make the nocache tag actually work
authorNikita Popov <nikita.ppv@gmail.com>
Thu, 4 Mar 2021 15:32:58 +0000 (16:32 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 4 Mar 2021 15:34:10 +0000 (16:34 +0100)
If nocache is used, then we should return an empty string result,
so the test doesn't get marked as borked.

Also limit to an occurrence at the start, just like other skip
tags.

run-tests.php

index a44a90bb7c115367ec3aa879fee840074a9c22e2..c04d2f4a97bf23065e5ca546bdca2deff0ca2f71 100755 (executable)
@@ -3749,8 +3749,10 @@ class SkipCache
 
         save_text($checkFile, $code, $tempFile);
         $result = trim(system_with_timeout("$php \"$checkFile\"", $env));
-        if (strpos($result, 'nocache') === false) {
+        if (strpos($result, 'nocache') !== 0) {
             $this->skips[$key][$code] = $result;
+        } else {
+            $result = '';
         }
         $this->misses++;