librefm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Librefm-commits] [1229] Check for PEAR::isError before we decide to out


From: Jørgen Bøhnsdalen
Subject: [Librefm-commits] [1229] Check for PEAR::isError before we decide to output stuff to user
Date: Wed, 06 May 2009 18:07:06 +0000

Revision: 1229
          http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1229
Author:   jurgbohn
Date:     2009-05-06 18:07:06 +0000 (Wed, 06 May 2009)
Log Message:
-----------
Check for PEAR::isError before we decide to output stuff to user

Modified Paths:
--------------
    trunk/nixtape/data/Album.php

Modified: trunk/nixtape/data/Album.php
===================================================================
--- trunk/nixtape/data/Album.php        2009-05-06 18:02:31 UTC (rev 1228)
+++ trunk/nixtape/data/Album.php        2009-05-06 18:07:06 UTC (rev 1229)
@@ -77,7 +77,7 @@
                $res = $mdb2->query("SELECT COUNT(*) AS scrobbles FROM 
Scrobbles JOIN Track ON Scrobbles.track = Track.name WHERE Scrobbles.artist = "
                        . $mdb2->quote($this->artist_name, 'text') . 'AND 
Track.album ='
                        . $mdb2->quote($this->name, 'text'));
-               if(!$res->numRows()) {
+               if(PEAR::isError($res) || !$res->numRows()) {
                        $c = 0;
                } else {
                        $row = sanitize($res->fetchRow(MDB2_FETCHMODE_ASSOC));





reply via email to

[Prev in Thread] Current Thread [Next in Thread]