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)) {
|
if (!array_key_exists('id', $fields)) {
|
||||||
$primaryKey = $this->findPrimaryKey($fields);
|
$primaryKey = $this->findPrimaryKey($fields);
|
||||||
}
|
}
|
||||||
|
$displayField = null;
|
||||||
if ($knownToExist) {
|
if ($knownToExist) {
|
||||||
$displayField = $tempModel->hasField(array('name', 'title'));
|
$displayField = $tempModel->hasField(array('name', 'title'));
|
||||||
if (!$displayField) {
|
if (!$displayField) {
|
||||||
|
|
|
@ -891,7 +891,7 @@ class App {
|
||||||
/**
|
/**
|
||||||
* Increases the PHP "memory_limit" ini setting by the specified amount
|
* Increases the PHP "memory_limit" ini setting by the specified amount
|
||||||
* in kilobytes
|
* in kilobytes
|
||||||
*
|
*
|
||||||
* @param string $additionalKb Number in kilobytes
|
* @param string $additionalKb Number in kilobytes
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -146,7 +146,7 @@ class Permission extends AppModel {
|
||||||
case -1:
|
case -1:
|
||||||
return false;
|
return false;
|
||||||
case 0:
|
case 0:
|
||||||
continue;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -381,10 +381,10 @@ class ExtractTaskTest extends CakeTestCase {
|
||||||
$this->Task->execute();
|
$this->Task->execute();
|
||||||
$result = file_get_contents($this->path . DS . 'default.pot');
|
$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);
|
$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);
|
$this->assertRegExp($pattern, $result);
|
||||||
|
|
||||||
$pattern = '#msgid "Post title is required"#';
|
$pattern = '#msgid "Post title is required"#';
|
||||||
|
@ -430,10 +430,10 @@ class ExtractTaskTest extends CakeTestCase {
|
||||||
$this->Task->execute();
|
$this->Task->execute();
|
||||||
$result = file_get_contents($this->path . DS . 'test_plugin.pot');
|
$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);
|
$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);
|
$this->assertRegExp($pattern, $result);
|
||||||
|
|
||||||
$pattern = '#msgid "Post title is required"#';
|
$pattern = '#msgid "Post title is required"#';
|
||||||
|
@ -469,10 +469,10 @@ class ExtractTaskTest extends CakeTestCase {
|
||||||
$this->Task->execute();
|
$this->Task->execute();
|
||||||
$result = file_get_contents($this->path . DS . 'test_plugin.pot');
|
$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);
|
$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);
|
$this->assertRegExp($pattern, $result);
|
||||||
|
|
||||||
$pattern = '#msgid "Post title is required"#';
|
$pattern = '#msgid "Post title is required"#';
|
||||||
|
|
|
@ -252,7 +252,7 @@ class Debugger {
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = compact(
|
$data = compact(
|
||||||
'level', 'error', 'code', 'description', 'file', 'path', 'line', 'context'
|
'level', 'error', 'code', 'description', 'file', 'line', 'context'
|
||||||
);
|
);
|
||||||
echo $self->outputError($data);
|
echo $self->outputError($data);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue