From: Zach Copley Date: Tue, 9 Feb 2010 05:52:05 +0000 (-0800) Subject: Better checking for duplicate app names X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=70d5f39ed66cb277e925ea71dcc24ca580110b3d;p=quix0rs-gnu-social.git Better checking for duplicate app names --- diff --git a/actions/editapplication.php b/actions/editapplication.php index ca5dba1e49..64cf0a5745 100644 --- a/actions/editapplication.php +++ b/actions/editapplication.php @@ -277,7 +277,7 @@ class EditApplicationAction extends OwnerDesignAction function nameExists($name) { $newapp = Oauth_application::staticGet('name', $name); - if (!$newapp) { + if (empty($newapp)) { return false; } else { return $newapp->id != $this->app->id; diff --git a/actions/newapplication.php b/actions/newapplication.php index c0c5207979..0f819b3499 100644 --- a/actions/newapplication.php +++ b/actions/newapplication.php @@ -290,7 +290,7 @@ class NewApplicationAction extends OwnerDesignAction function nameExists($name) { $app = Oauth_application::staticGet('name', $name); - return ($app !== false); + return !empty($app); } }