From fb420ccfb1e5329853d0ef32e7ba90fcb388948f Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Tue, 23 Nov 2021 13:57:38 -0600 Subject: [PATCH] PHP 8.1: Fix some more null value issues * `e_form::attributes()` * `e_parse::toImage()` --- e107_handlers/e_parse_class.php | 2 +- e107_handlers/form_handler.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index 495a3d461..c6ddcbe99 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -4333,7 +4333,7 @@ class e_parse else { $log = e107::getLog(); - $log->addDebug('Broken Image Path: ' . $legacyPath . "\n" . print_r(debug_backtrace(null, 2), true), false)->save('IMALAN_00'); + $log->addDebug('Broken Image Path: ' . $legacyPath . "\n" . print_r(debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 2), true), false)->save('IMALAN_00'); e107::getDebug()->log('Broken Image Path: ' . $legacyPath); } diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index cc2499778..819974278 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -4048,7 +4048,7 @@ var_dump($select_options);*/ } if (!empty($value) || is_numeric($value) || $key === "value" || strpos($key,'data-') === 0) { - $stringifiedAttributes[] = $key . "='" . htmlspecialchars($value, ENT_QUOTES) . "'"; + $stringifiedAttributes[] = $key . "='" . htmlspecialchars((string) $value, ENT_QUOTES) . "'"; } }