MDL-76362 various: Avoid passing nulls to functions that don't allow nulls
commit2dd7290ccbd4057192ba0d695411f62e9f3a2b4d
authorMarina Glancy <marina@moodle.com>
Thu, 17 Nov 2022 15:04:24 +0000 (17 16:04 +0100)
committerAndrew Nicols <andrew@nicols.co.uk>
Mon, 23 Jan 2023 01:16:06 +0000 (23 09:16 +0800)
tree691adde9229c4041adb4d7b87a241a1ec3c86017
parentd83368a475103da04af8af962db4a522f894f60a
MDL-76362 various: Avoid passing nulls to functions that don't allow nulls

PHP 8.1 is more strict on the parameter type. Functions such as trim(), strlen(), str_replace(), etc
show notice when null is passed as an argument
69 files changed:
admin/tool/analytics/classes/output/helper.php
admin/tool/behat/cli/run.php
admin/tool/brickfield/classes/manager.php
admin/tool/dataprivacy/classes/data_registry.php
admin/tool/dataprivacy/classes/external/purpose_exporter.php
admin/tool/log/classes/helper/reader.php
admin/tool/moodlenet/classes/local/remote_resource.php
analytics/classes/model.php
backup/moodle2/backup_custom_fields.php
backup/util/helper/restore_decode_processor.class.php
backup/util/helper/restore_structure_parser_processor.class.php
backup/util/xml/output/xml_output.class.php
backup/util/xml/xml_writer.class.php
badges/classes/backpack_api_mapping.php
cache/classes/helper.php
course/classes/external/course_summary_exporter.php
course/format/classes/base.php
course/format/classes/output/local/content/frontpagesection.php
course/user.php
customfield/classes/field.php
enrol/lti/classes/data_connector.php
enrol/lti/classes/local/ltiadvantage/lib/http_client.php
grade/report/singleview/classes/local/screen/user.php
h5p/ajax.php
h5p/classes/api.php
h5p/classes/editor_framework.php
lib/accesslib.php
lib/behat/extension/Moodle/BehatExtension/Locator/FilesystemSkipPassedListLocator.php
lib/classes/component.php
lib/classes/date.php
lib/dml/pgsql_native_moodle_database.php
lib/evalmath/evalmath.class.php
lib/evalmath/readme_moodle.txt
lib/filebrowser/file_info.php
lib/filelib.php
lib/filestorage/file_storage.php
lib/filestorage/file_system_filedir.php
lib/filestorage/tgz_extractor.php
lib/form/classes/filetypes_util.php
lib/form/passwordunmask.php
lib/formslib.php
lib/html2text/lib.php
lib/mathslib.php
lib/navigationlib.php
lib/outputcomponents.php
lib/outputlib.php
lib/setuplib.php
lib/tablelib.php
lib/tests/behat/behat_accessibility.php
lib/weblib.php
media/player/youtube/classes/plugin.php
mod/data/classes/preset.php
mod/data/classes/search/entry.php
mod/data/field/latlong/field.class.php
mod/data/field/number/field.class.php
mod/data/lib.php
mod/h5pactivity/classes/xapi/handler.php
mod/lti/lib.php
mod/lti/locallib.php
mod/quiz/accessrule/seb/classes/quiz_settings.php
mod/survey/classes/privacy/provider.php
mod/workshop/classes/portfolio_caller.php
privacy/classes/local/request/moodle_content_writer.php
privacy/classes/tests/request/content_writer.php
question/engine/renderer.php
question/type/calculated/db/upgradelib.php
question/type/calculatedmulti/db/upgradelib.php
question/type/multianswer/renderer.php
question/type/numerical/questiontype.php