@@ -240,7 +240,7 @@ class JsonableBehavior extends Behavior {
return $val;
}
- $flags = JSON_THROW_ON_ERROR | $this->_config['decodeParams']['options'];
+ $flags = $this->_config['decodeParams']['options'];
$decoded = json_decode($val, $this->_config['decodeParams']['assoc'], $this->_config['decodeParams']['depth'], $flags);
if ($decoded === false) {
@@ -435,10 +435,10 @@ class PasswordableBehavior extends Behavior {
return true;
- $primaryKey = $context['data'][$primaryKey];
+ $primaryKeyValue = $context['data'][$primaryKey];
$value = $context['data'][$context['field']];
- $dbValue = $this->_table->find()->where([$this->_table->getAlias() . '.' . $primaryKey => $primaryKey])->first();
+ $dbValue = $this->_table->find()->where([$this->_table->getAlias() . '.' . $primaryKey => $primaryKeyValue])->first();
if (!$dbValue) {