From 7a2c5e618b62d80df05f7b21c77d840b9e764ef6 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Thu, 13 Jan 2011 02:17:24 +0100 Subject: [PATCH] [feature/system-cron] preg_match returns int so cast to bool, fix comment PHPBB3-9596 --- phpBB/includes/cron/manager.php | 2 +- phpBB/includes/lock/db.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/cron/manager.php b/phpBB/includes/cron/manager.php index e6ad974d6d..aa09fb41ac 100644 --- a/phpBB/includes/cron/manager.php +++ b/phpBB/includes/cron/manager.php @@ -132,7 +132,7 @@ class phpbb_cron_manager */ public function is_valid_name($name) { - return preg_match('/^[a-zA-Z][a-zA-Z0-9_]*$/', $name); + return (bool) preg_match('/^[a-zA-Z][a-zA-Z0-9_]*$/', $name); } /** diff --git a/phpBB/includes/lock/db.php b/phpBB/includes/lock/db.php index f5f1b4c6f9..20dbb63e0c 100644 --- a/phpBB/includes/lock/db.php +++ b/phpBB/includes/lock/db.php @@ -55,7 +55,7 @@ class phpbb_lock_db /** * Creates a named released instance of the lock. * - * You have to call lock to actually create the lock. + * You have to call acquire() to actually create the lock. * * @param string $config_name A config variable to be used for locking * @param array $config The phpBB configuration