Ensure PHP code is compatible to legacy versions

This commit is contained in:
cytopia 2022-01-24 09:15:52 +01:00
parent d9fb88058f
commit 2f8fc59dd9
No known key found for this signature in database
GPG Key ID: 6D56EDB8695128A2

View File

@ -136,7 +136,7 @@ function loadClass($class) {
* This pattern will match optional quoted string, 'my password' or "my password"
* or if there aren't any quotes, it will match up until the next space.
*/
$_REDIS_PASS = [];
$_REDIS_PASS = array();
preg_match_all('/--requirepass\s+("|\')?(?(1)(.*)|([^\s]*))(?(1)\1|)/', $_REDIS_ARGS, $_REDIS_PASS, PREG_SET_ORDER);
if (! empty($_REDIS_PASS)) {