mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 12:28:52 +00:00
[feature/system-cron] Cast result in cron_manager::is_valid_name() to bool.
PHPBB3-9596
This commit is contained in:
parent
f4f8523ca3
commit
3c0561b68f
1 changed files with 2 additions and 2 deletions
|
@ -100,11 +100,11 @@ class phpbb_cron_manager
|
||||||
*
|
*
|
||||||
* @param string $name Name to check
|
* @param string $name Name to check
|
||||||
*
|
*
|
||||||
* @return int
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function is_valid_name($name)
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue