mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Alter Model::exists() to return false with no table
This commit is contained in:
parent
2f7cc052d2
commit
fdb41e01bb
2 changed files with 2 additions and 2 deletions
|
@ -2896,7 +2896,7 @@ class Model extends Object implements CakeEventListener {
|
|||
}
|
||||
|
||||
if ($this->useTable === false) {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
return (bool)$this->find('count', array(
|
||||
|
|
|
@ -2787,7 +2787,7 @@ class ModelWriteTest extends BaseModelTest {
|
|||
$this->assertFalse($TestModel->exists());
|
||||
|
||||
$TestModel->id = 5;
|
||||
$this->assertTrue($TestModel->exists());
|
||||
$this->assertFalse($TestModel->exists());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue