From: Stricted Date: Sun, 28 Jun 2015 06:57:28 +0000 (+0200) Subject: remove useless preg_replace X-Git-Tag: 1.0.0~16 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dae16c50daa8b58cfede18e9cd3c1a9fd9333132;p=GitHub%2FStricted%2Fspeedport-hybrid-php-api.git remove useless preg_replace --- diff --git a/speedport.class.php b/speedport.class.php index 17155c0..692b7c3 100644 --- a/speedport.class.php +++ b/speedport.class.php @@ -295,9 +295,8 @@ class speedport { // fix invalid json $body = preg_replace("/(\r\n)|(\r)/", "\n", $body); $body = preg_replace('/\'/i', '"', $body); - $body = preg_replace("/},\n\n]/", "}\n]", $body); $body = preg_replace("/\[\s+\]/i", '[ {} ]', $body); - $body = preg_replace("/},\n\s+]/", "} ]", $body); + $body = preg_replace("/},\s+]/", "}\n]", $body); return array('header' => $this->parse_headers($header), 'body' => $body); }