Merge pull request #1609 from GaneshKandu/patch-1
This commit is contained in:
commit
034c1ce526
1 changed files with 3 additions and 3 deletions
|
@ -19,7 +19,7 @@ public function read($filepath)
|
||||||
$data = file_get_contents($filepath);
|
$data = file_get_contents($filepath);
|
||||||
$data = str_replace(self::getPhpHeaders(), '', $data);
|
$data = str_replace(self::getPhpHeaders(), '', $data);
|
||||||
$data = str_replace(self::getPhpSuffix(), '', $data);
|
$data = str_replace(self::getPhpSuffix(), '', $data);
|
||||||
$data = json_decode($data, true);
|
$data = json_decode(trim($data), true);
|
||||||
if ($data === null) {
|
if ($data === null) {
|
||||||
$errorCode = json_last_error();
|
$errorCode = json_last_error();
|
||||||
$error = sprintf(
|
$error = sprintf(
|
||||||
|
@ -73,7 +73,7 @@ public function getExtension()
|
||||||
*/
|
*/
|
||||||
public static function getPhpHeaders()
|
public static function getPhpHeaders()
|
||||||
{
|
{
|
||||||
return '<?php /*'. PHP_EOL;
|
return '<?php /*';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -85,6 +85,6 @@ public static function getPhpHeaders()
|
||||||
*/
|
*/
|
||||||
public static function getPhpSuffix()
|
public static function getPhpSuffix()
|
||||||
{
|
{
|
||||||
return PHP_EOL . '*/ ?>';
|
return '*/ ?>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue