Skip to content

Commit

Permalink
Merge pull request #475 from ShinichiU/t-3026
Browse files Browse the repository at this point in the history
fix compatibility with PHP 5.2.x (fixes #3026)
  • Loading branch information
nishizoe committed Dec 4, 2020
2 parents 157450f + 20d0311 commit 0304406
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 15 deletions.
6 changes: 3 additions & 3 deletions apps/pc_frontend/templates/_layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
), $jsonData);
}

$json = defined('JSON_PRETTY_PRINT') ? json_encode($jsonData, JSON_PRETTY_PRINT) : json_encode($jsonData);

echo javascript_tag('var openpne = '.$json.';');
echo javascript_tag('
var openpne = '.json_encode($jsonData).';
');
?>
<?php include_javascripts() ?>
<?php echo javascript_tag(<<<JS
Expand Down
4 changes: 1 addition & 3 deletions apps/pc_frontend/templates/smtLayoutGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
'baseUrl' => $sf_request->getRelativeUrlRoot().'/',
);

$json = defined('JSON_PRETTY_PRINT') ? json_encode($jsonData, JSON_PRETTY_PRINT) : json_encode($jsonData);

echo javascript_tag('
var openpne = '.$json.';
var openpne = '.json_encode($jsonData).';
');
?>
<?php endif ?>
Expand Down
4 changes: 1 addition & 3 deletions apps/pc_frontend/templates/smtLayoutHome.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
'baseUrl' => $sf_request->getRelativeUrlRoot().'/',
);

$json = defined('JSON_PRETTY_PRINT') ? json_encode($jsonData, JSON_PRETTY_PRINT) : json_encode($jsonData);

echo javascript_tag('
var openpne = '.$json.';
var openpne = '.json_encode($jsonData).';
');
?>
<?php endif ?>
Expand Down
4 changes: 1 addition & 3 deletions apps/pc_frontend/templates/smtLayoutMember.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
'baseUrl' => $sf_request->getRelativeUrlRoot().'/',
);

$json = defined('JSON_PRETTY_PRINT') ? json_encode($jsonData, JSON_PRETTY_PRINT) : json_encode($jsonData);

echo javascript_tag('
var openpne = '.$json.';
var openpne = '.json_encode($jsonData).';
');
?>
<?php endif ?>
Expand Down
4 changes: 1 addition & 3 deletions apps/pc_frontend/templates/smtLayoutSns.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
'baseUrl' => $sf_request->getRelativeUrlRoot().'/',
);

$json = defined('JSON_PRETTY_PRINT') ? json_encode($jsonData, JSON_PRETTY_PRINT) : json_encode($jsonData);

echo javascript_tag('
var openpne = '.$json.';
var openpne = '.json_encode($jsonData).';
');
?>
<?php endif ?>
Expand Down

0 comments on commit 0304406

Please sign in to comment.