Skip to content

Commit

Permalink
Fix usage of non-existant property.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
markstory committed Feb 4, 2018
1 parent 49725a8 commit 5816143
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Model/Datasource/DboSource.php
Expand Up @@ -470,7 +470,7 @@ protected function _execute($sql, $params = array(), $prepareOptions = array())
$query = $this->_connection->prepare($sql, $prepareOptions);
$query->setFetchMode(PDO::FETCH_LAZY);
if (!$query->execute($params)) {
$this->_results = $query;
$this->_result = $query;
$query->closeCursor();
return false;
}
Expand Down

0 comments on commit 5816143

Please sign in to comment.