mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixed: "strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated"
This commit is contained in:
parent
d83997f849
commit
ef0e0a7175
1 changed files with 2 additions and 1 deletions
|
@ -361,7 +361,8 @@ class Mysql extends DboSource {
|
||||||
$fields[$column->Field]['unsigned'] = $this->_unsigned($column->Type);
|
$fields[$column->Field]['unsigned'] = $this->_unsigned($column->Type);
|
||||||
}
|
}
|
||||||
if (in_array($fields[$column->Field]['type'], array('timestamp', 'datetime')) &&
|
if (in_array($fields[$column->Field]['type'], array('timestamp', 'datetime')) &&
|
||||||
in_array(strtoupper($column->Default), array('CURRENT_TIMESTAMP', 'CURRENT_TIMESTAMP()'))
|
//Falling back to default empty string due to PHP8.1 deprecation notice.
|
||||||
|
in_array(strtoupper($column->Default ?? ""), array('CURRENT_TIMESTAMP', 'CURRENT_TIMESTAMP()'))
|
||||||
) {
|
) {
|
||||||
$fields[$column->Field]['default'] = null;
|
$fields[$column->Field]['default'] = null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue