MDL-67114 core: php74 fix. Fix use of scalar as array in core
There are various places where it's not guaranteed that the variable being used is array, and instead, can be null, bool, int... We need to check that because php74 warns about it. Where possible we have used the coalesce operator as replacement for isset() ternary operations.
This commit is contained in:
@@ -47,7 +47,7 @@ class wiki_parser_proxy {
|
||||
return $content;
|
||||
}
|
||||
else {
|
||||
return $content[1];
|
||||
return is_array($content) ? $content[1] : null;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user