mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix some PHP 7.3 errors
This commit is contained in:
parent
dd9601d73f
commit
90ddb43632
5 changed files with 10 additions and 10 deletions
|
@ -224,7 +224,7 @@ class ModelTask extends BakeTask {
|
|||
if (!array_key_exists('id', $fields)) {
|
||||
$primaryKey = $this->findPrimaryKey($fields);
|
||||
}
|
||||
|
||||
$displayField = null;
|
||||
if ($knownToExist) {
|
||||
$displayField = $tempModel->hasField(array('name', 'title'));
|
||||
if (!$displayField) {
|
||||
|
|
|
@ -146,7 +146,7 @@ class Permission extends AppModel {
|
|||
case -1:
|
||||
return false;
|
||||
case 0:
|
||||
continue;
|
||||
break;
|
||||
case 1:
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -381,10 +381,10 @@ class ExtractTaskTest extends CakeTestCase {
|
|||
$this->Task->execute();
|
||||
$result = file_get_contents($this->path . DS . 'default.pot');
|
||||
|
||||
$pattern = preg_quote('#Model/PersisterOne.php:validation for field title#', '\\');
|
||||
$pattern = preg_quote('#Model/PersisterOne.php:validation for field title#', '/');
|
||||
$this->assertRegExp($pattern, $result);
|
||||
|
||||
$pattern = preg_quote('#Model/PersisterOne.php:validation for field body#', '\\');
|
||||
$pattern = preg_quote('#Model/PersisterOne.php:validation for field body#', '/');
|
||||
$this->assertRegExp($pattern, $result);
|
||||
|
||||
$pattern = '#msgid "Post title is required"#';
|
||||
|
@ -430,10 +430,10 @@ class ExtractTaskTest extends CakeTestCase {
|
|||
$this->Task->execute();
|
||||
$result = file_get_contents($this->path . DS . 'test_plugin.pot');
|
||||
|
||||
$pattern = preg_quote('#Plugin/TestPlugin/Model/TestPluginPost.php:validation for field title#', '\\');
|
||||
$pattern = preg_quote('#Plugin/TestPlugin/Model/TestPluginPost.php:validation for field title#', '/');
|
||||
$this->assertRegExp($pattern, $result);
|
||||
|
||||
$pattern = preg_quote('#Plugin/TestPlugin/Model/TestPluginPost.php:validation for field body#', '\\');
|
||||
$pattern = preg_quote('#Plugin/TestPlugin/Model/TestPluginPost.php:validation for field body#', '/');
|
||||
$this->assertRegExp($pattern, $result);
|
||||
|
||||
$pattern = '#msgid "Post title is required"#';
|
||||
|
@ -469,10 +469,10 @@ class ExtractTaskTest extends CakeTestCase {
|
|||
$this->Task->execute();
|
||||
$result = file_get_contents($this->path . DS . 'test_plugin.pot');
|
||||
|
||||
$pattern = preg_quote('#Model/TestPluginPost.php:validation for field title#', '\\');
|
||||
$pattern = preg_quote('#Model/TestPluginPost.php:validation for field title#', '/');
|
||||
$this->assertRegExp($pattern, $result);
|
||||
|
||||
$pattern = preg_quote('#Model/TestPluginPost.php:validation for field body#', '\\');
|
||||
$pattern = preg_quote('#Model/TestPluginPost.php:validation for field body#', '/');
|
||||
$this->assertRegExp($pattern, $result);
|
||||
|
||||
$pattern = '#msgid "Post title is required"#';
|
||||
|
|
|
@ -252,7 +252,7 @@ class Debugger {
|
|||
}
|
||||
|
||||
$data = compact(
|
||||
'level', 'error', 'code', 'description', 'file', 'path', 'line', 'context'
|
||||
'level', 'error', 'code', 'description', 'file', 'line', 'context'
|
||||
);
|
||||
echo $self->outputError($data);
|
||||
|
||||
|
|
Loading…
Reference in a new issue