Merge branch '2.8' into 3.4
* 2.8: [HttpKernel] fix test compat with PHP 5.3 fix file lock on SunOS change `evaluate()` docblock return type from string to mixed Set serialize_precision explicitly to avoid fancy float rounding
This commit is contained in:
commit
7090495250
@ -71,7 +71,7 @@ class ExpressionLanguage
|
||||
* @param Expression|string $expression The expression to compile
|
||||
* @param array $values An array of values
|
||||
*
|
||||
* @return string The result of the evaluation of the expression
|
||||
* @return mixed The result of the evaluation of the expression
|
||||
*/
|
||||
public function evaluate($expression, $values = array())
|
||||
{
|
||||
|
@ -81,12 +81,12 @@ class LockHandler
|
||||
$error = $msg;
|
||||
});
|
||||
|
||||
if (!$this->handle = fopen($this->file, 'r')) {
|
||||
if (!$this->handle = fopen($this->file, 'r+') ?: fopen($this->file, 'r')) {
|
||||
if ($this->handle = fopen($this->file, 'x')) {
|
||||
chmod($this->file, 0444);
|
||||
} elseif (!$this->handle = fopen($this->file, 'r')) {
|
||||
} elseif (!$this->handle = fopen($this->file, 'r+') ?: fopen($this->file, 'r')) {
|
||||
usleep(100); // Give some time for chmod() to complete
|
||||
$this->handle = fopen($this->file, 'r');
|
||||
$this->handle = fopen($this->file, 'r+') ?: fopen($this->file, 'r');
|
||||
}
|
||||
}
|
||||
restore_error_handler();
|
||||
|
@ -16,6 +16,15 @@ use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
|
||||
class JsonResponseTest extends TestCase
|
||||
{
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
if (!defined('HHVM_VERSION')) {
|
||||
$this->iniSet('serialize_precision', 14);
|
||||
}
|
||||
}
|
||||
|
||||
public function testConstructorEmptyCreatesJsonObject()
|
||||
{
|
||||
$response = new JsonResponse();
|
||||
|
Reference in New Issue
Block a user