From a66f170c5e9812bf4564db9909b459086e165d29 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sun, 23 Oct 2022 13:21:22 +0200 Subject: [PATCH] PHP 5.6 seems to tolerate an empty string as valid JSON --- tst/YourlsProxyTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tst/YourlsProxyTest.php b/tst/YourlsProxyTest.php index 6e4df60..2e37299 100644 --- a/tst/YourlsProxyTest.php +++ b/tst/YourlsProxyTest.php @@ -66,7 +66,7 @@ class YourlsProxyTest extends PHPUnit_Framework_TestCase public function testServerError() { // simulate some other server error that results in a non-JSON reply - file_put_contents($this->_mock_yourls_service, ''); + file_put_contents($this->_mock_yourls_service, '500 Internal Server Error'); $yourls = new YourlsProxy($this->_conf, 'https://example.com/?foo#bar'); $this->assertTrue($yourls->isError());