mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix usage of non-existant property.
Use the declared `_result` property instead. I would normally add a test, but getting to this path requires a query to fail which is not simple to simulate in the test harness. Fixes #11615
This commit is contained in:
parent
49725a8f86
commit
5816143493
1 changed files with 1 additions and 1 deletions
|
@ -470,7 +470,7 @@ class DboSource extends DataSource {
|
||||||
$query = $this->_connection->prepare($sql, $prepareOptions);
|
$query = $this->_connection->prepare($sql, $prepareOptions);
|
||||||
$query->setFetchMode(PDO::FETCH_LAZY);
|
$query->setFetchMode(PDO::FETCH_LAZY);
|
||||||
if (!$query->execute($params)) {
|
if (!$query->execute($params)) {
|
||||||
$this->_results = $query;
|
$this->_result = $query;
|
||||||
$query->closeCursor();
|
$query->closeCursor();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue