#1120 - avoiding version comparisons when working with version-dependant constants
This commit is contained in:
parent
ed79648d7d
commit
7cf427cfbf
1 changed files with 4 additions and 2 deletions
|
@ -234,7 +234,7 @@ EOT
|
|||
}
|
||||
|
||||
if (is_array($value)) {
|
||||
if (version_compare(phpversion(), '5.4.0', '>=')) {
|
||||
if (defined('JSON_UNESCAPED_UNICODE') && defined('JSON_UNESCAPED_SLASHES')) {
|
||||
return json_encode($value, JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);
|
||||
}
|
||||
|
||||
|
@ -275,8 +275,10 @@ EOT
|
|||
private function formatAssociationMappings($associationMappings)
|
||||
{
|
||||
$this->formatField('Association mappings:', '');
|
||||
|
||||
foreach ($associationMappings as $associationName => $mapping) {
|
||||
$this->formatField(sprintf(' %s',$associationName), '');
|
||||
$this->formatField(sprintf(' %s', $associationName), '');
|
||||
|
||||
foreach ($mapping as $field => $value) {
|
||||
$this->formatField(sprintf(' %s', $field), $this->formatValue($value));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue