mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-03 00:07:58 +02:00
MINOR: return false rather than error out in case SS_Query:: is not a resource
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@107030 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b5ad10bff1
commit
7be9ca0c7e
@ -1073,11 +1073,11 @@ class MySQLQuery extends SS_Query {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function seek($row) {
|
public function seek($row) {
|
||||||
return mysql_data_seek($this->handle, $row);
|
return is_resource($this->handle) ? mysql_data_seek($this->handle, $row) : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function numRecords() {
|
public function numRecords() {
|
||||||
return mysql_num_rows($this->handle);
|
return is_resource($this->handle) ? mysql_num_rows($this->handle) : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function nextRecord() {
|
public function nextRecord() {
|
||||||
|
Loading…
Reference in New Issue
Block a user