fix: fix some deprecation notices in 8.2
parent
d1cd1da67f
commit
9b7c693bb9
|
@ -178,7 +178,6 @@ return [
|
|||
*/
|
||||
'Error' => [
|
||||
'errorLevel' => E_ALL,
|
||||
'exceptionRenderer' => ExceptionRenderer::class,
|
||||
'skipLog' => [],
|
||||
'log' => true,
|
||||
'trace' => true,
|
||||
|
|
|
@ -106,7 +106,7 @@ class TagHelper extends Helper
|
|||
$deleteButton = $this->Bootstrap->button([
|
||||
'size' => 'sm',
|
||||
'icon' => 'times',
|
||||
'class' => ['ms-1', 'border-0', "text-${textColour}"],
|
||||
'class' => ['ms-1', 'border-0', "text-$textColour"],
|
||||
'variant' => 'text',
|
||||
'title' => __('Delete tag'),
|
||||
'onclick' => sprintf('deleteTag(\'%s\', \'%s\', this)',
|
||||
|
|
|
@ -136,7 +136,7 @@ class ImporterCommand extends Command
|
|||
$entity = null;
|
||||
if (isset($item[$primary_key])) {
|
||||
$query = $table->find('all')
|
||||
->where(["${primary_key}" => $item[$primary_key]]);
|
||||
->where(["$primary_key" => $item[$primary_key]]);
|
||||
$entity = $query->first();
|
||||
}
|
||||
if (is_null($entity)) {
|
||||
|
|
|
@ -1465,7 +1465,7 @@ class CRUDComponent extends Component
|
|||
{
|
||||
$prefixedConditions = [];
|
||||
foreach ($conditions as $condField => $condValue) {
|
||||
$prefixedConditions["${prefix}.${condField}"] = $condValue;
|
||||
$prefixedConditions["$prefix.$condField"] = $condValue;
|
||||
}
|
||||
return $prefixedConditions;
|
||||
}
|
||||
|
@ -1589,13 +1589,13 @@ class CRUDComponent extends Component
|
|||
[sprintf('%s.id = %s.%s', $this->Table->getAlias(), $associatedTable->getAlias(), $association->getForeignKey())]
|
||||
)
|
||||
->where([
|
||||
["${field} IS NOT" => NULL]
|
||||
["$field IS NOT" => NULL]
|
||||
]);
|
||||
} else if ($associationType == 'manyToOne') {
|
||||
$fieldToExtract = sprintf('%s.%s', Inflector::singularize(strtolower($model)), $subField);
|
||||
$query = $this->Table->find()->contain($model);
|
||||
} else {
|
||||
throw new Exception("Association ${associationType} not supported in CRUD Component");
|
||||
throw new Exception("Association $associationType not supported in CRUD Component");
|
||||
}
|
||||
} else {
|
||||
$fieldToExtract = $field;
|
||||
|
|
|
@ -390,7 +390,7 @@ class RestResponseComponent extends Component
|
|||
return '[]';
|
||||
}
|
||||
|
||||
public function saveFailResponse($controller, $action, $id = false, $validationErrors, $format = false)
|
||||
public function saveFailResponse($controller, $action, $id, $validationErrors, $format = false)
|
||||
{
|
||||
$this->autoRender = false;
|
||||
$response = array();
|
||||
|
|
Loading…
Reference in New Issue