Skip to content

Commit 86adf81

Browse files
author
dereuromark
committed
php5.5 compat
1 parent d5d89e6 commit 86adf81

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Model/Behavior/JsonableBehavior.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@
3535
*/
3636
class JsonableBehavior extends Behavior {
3737

38-
const OPTIONS_DEFAULT = JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_ERROR_INF_OR_NAN | JSON_PARTIAL_OUTPUT_ON_ERROR;
39-
4038
/**
4139
* @var string|false|null
4240
*/
@@ -92,7 +90,8 @@ public function initialize(array $config = []) {
9290
$this->_table->schema()->columnType($field, 'array');
9391
}
9492
if ($this->_config['encodeParams']['options'] === null) {
95-
$this->_config['encodeParams']['options'] = static::OPTIONS_DEFAULT;
93+
$options = JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_ERROR_INF_OR_NAN | JSON_PARTIAL_OUTPUT_ON_ERROR;
94+
$this->_config['encodeParams']['options'] = $options;
9695
}
9796
}
9897

0 commit comments

Comments
 (0)