mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: return false rather than error out in case SS_Query:: is not a resource (from r107030)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112544 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
a0424ccd3e
commit
997a86b7e0
@ -1073,11 +1073,11 @@ class MySQLQuery extends SS_Query {
|
||||
}
|
||||
|
||||
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() {
|
||||
return mysql_num_rows($this->handle);
|
||||
return is_resource($this->handle) ? mysql_num_rows($this->handle) : false;
|
||||
}
|
||||
|
||||
public function nextRecord() {
|
||||
|
Loading…
Reference in New Issue
Block a user