librefm-commits
[Top][All Lists]
Advanced

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

[Librefm-commits] [1407] Return PEAR_Error from Artist if artist does no


From: Jørgen Bøhnsdalen
Subject: [Librefm-commits] [1407] Return PEAR_Error from Artist if artist does not exist
Date: Fri, 08 May 2009 10:20:34 +0000

Revision: 1407
          http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1407
Author:   jurgbohn
Date:     2009-05-08 10:20:33 +0000 (Fri, 08 May 2009)
Log Message:
-----------
Return PEAR_Error from Artist if artist does not exist

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

Modified: trunk/nixtape/data/Artist.php
===================================================================
--- trunk/nixtape/data/Artist.php       2009-05-08 10:19:43 UTC (rev 1406)
+++ trunk/nixtape/data/Artist.php       2009-05-08 10:20:33 UTC (rev 1407)
@@ -52,7 +52,7 @@
                        . "mbid = " . $mdb2->quote($mbid, "text") . " OR "
                        . "name = " . $mdb2->quote($name, "text"));
                if(!$res->numRows()) {
-                       PEAR::raiseError("No such artist: " . $name);
+                       return(new PEAR_Error("No such artist: " . $name));
                } else {
                        $row = sanitize($res->fetchRow(MDB2_FETCHMODE_ASSOC));
                        $this->name = $row["name"];





reply via email to

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