浏览代码

[BrowserKit] fixed a weird behavior where a PHP process returns a successful exit code, but the PHP scripts actually died

Fabien Potencier 14 年之前
父节点
当前提交
6d334289ee
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Symfony/Component/BrowserKit/Client.php

+ 1 - 1
src/Symfony/Component/BrowserKit/Client.php

@@ -285,7 +285,7 @@ abstract class Client
         $process = new PhpProcess($this->getScript($request));
         $process->run();
 
-        if (!$process->isSuccessful()) {
+        if (!$process->isSuccessful() || !preg_match('/^O\:\d+\:/', $process->getOutput())) {
             throw new \RuntimeException($process->getErrorOutput());
         }