MDL-67114 core: php74 fix. Fix use of scalar as array in core
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Sat, 2 Nov 2019 19:03:40 +0000 (20:03 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Fri, 3 Jan 2020 10:33:15 +0000 (11:33 +0100)
commit4621917c62c9634fa79927b0ed66b92a733e1498
treef626e14ef626e75e472b5d3881a8f648f2bf12a9
parenta6e544e825180eba5d657bb839d01bb063825239
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.
12 files changed:
competency/tests/privacy_test.php
enrol/meta/lib.php
lib/editor/tests/fixtures/editor_form.php
lib/filestorage/file_system.php
lib/form/duration.php
lib/form/filetypes.php
lib/tests/session_manager_test.php
mod/glossary/import_form.php
mod/wiki/comments_form.php
mod/wiki/parser/parser.php
question/engine/questionusage.php
repository/dropbox/classes/dropbox.php