diff options
| author | 2022-01-30 15:53:17 +0100 | |
|---|---|---|
| committer | 2022-01-30 15:53:17 +0100 | |
| commit | 47e242aa77bb8583e8716023c4bcef0462891ebd (patch) | |
| tree | 05ca76b2459db75c9ae3236acbc6ec711fb5c7dd /lib/Minz/ExtensionManager.php | |
| parent | 24afafb74d422bd8d7526719046253279cb7e713 (diff) | |
Fix ctype_alnum (#4182)
* Fix ctype_alnum
#fix https://github.com/FreshRSS/FreshRSS/issues/4180
Ensure `ctype_alnum()` gets a string
* Changelog
Diffstat (limited to 'lib/Minz/ExtensionManager.php')
| -rw-r--r-- | lib/Minz/ExtensionManager.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Minz/ExtensionManager.php b/lib/Minz/ExtensionManager.php index cad408aed..17977fb0c 100644 --- a/lib/Minz/ExtensionManager.php +++ b/lib/Minz/ExtensionManager.php @@ -139,10 +139,10 @@ class Minz_ExtensionManager { * If the extension class name is `TestExtension`, entry point will be `Test`. * `entry_point` must be composed of alphanumeric characters. * - * @param array $meta is an array of values. + * @param array<string> $meta is an array of values. * @return bool true if the array is valid, false else. */ - public static function isValidMetadata($meta) { + public static function isValidMetadata($meta): bool { $valid_chars = array('_'); return !(empty($meta['name']) || empty($meta['entrypoint']) || !ctype_alnum(str_replace($valid_chars, '', $meta['entrypoint']))); } |
