summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2014-05-31 23:00:51 +0100
committerlsces <lester@lsces.co.uk>2014-05-31 23:00:51 +0100
commit681960b396757213ffd489e5a5f8f93199052112 (patch)
tree0b3c58946521983deb7503ae4f3c67a3ce086087
parent1a3a19da786f1d3edc70c97236e3ed9f82d858f2 (diff)
downloadcontact-681960b396757213ffd489e5a5f8f93199052112.tar.gz
contact-681960b396757213ffd489e5a5f8f93199052112.tar.bz2
contact-681960b396757213ffd489e5a5f8f93199052112.zip
Populate mInfo only when data found
-rw-r--r--Contact.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/Contact.php b/Contact.php
index ff64211..0e64783 100644
--- a/Contact.php
+++ b/Contact.php
@@ -657,8 +657,10 @@ class Contact extends LibertyContent {
$result = $this->mDb->query( $sql, $bindVars );
- while( $res = $result->fetchRow() ) {
- $this->mInfo[$res['type_source']][] = $res;
+ if($result) {
+ while( $res = $result->fetchRow() ) {
+ $this->mInfo[$res['type_source']][] = $res;
+ }
}
}
}