diff options
| author | lsces <lester@lsces.co.uk> | 2014-05-31 23:00:51 +0100 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2014-05-31 23:00:51 +0100 |
| commit | 681960b396757213ffd489e5a5f8f93199052112 (patch) | |
| tree | 0b3c58946521983deb7503ae4f3c67a3ce086087 | |
| parent | 1a3a19da786f1d3edc70c97236e3ed9f82d858f2 (diff) | |
| download | contact-681960b396757213ffd489e5a5f8f93199052112.tar.gz contact-681960b396757213ffd489e5a5f8f93199052112.tar.bz2 contact-681960b396757213ffd489e5a5f8f93199052112.zip | |
Populate mInfo only when data found
| -rw-r--r-- | Contact.php | 6 |
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; + } } } } |
