e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
318 stars 212 forks source link

PHP 8.2 Warnings and Deprecation Notices. #5079

Closed CaMer0n closed 7 months ago

CaMer0n commented 9 months ago

Bug Description

Some code in e107 triggers deprecation notices in PHP 8.2

Jimmi08 commented 3 weeks ago

Deprecated: Creation of dynamic property UserHandler::$otherFieldTypes is deprecated in ...\ehandlers\user_handler.php on line 128

Jimmi08 commented 3 weeks ago

Deprecated: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspecialchars, htmlentities, or mb_encode_numericentity/mb_decode_numericentity instead in ***\ehandlers\e_parse_class.php on line 5309

Jimmi08 commented 3 weeks ago

Deprecated: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

This code is used in thumb.php

        // basic Admin area detection - required for proper path parsing
        define('ADMIN', strpos(e_SELF, (e107::getFolder('admin')) != false || strpos(e_PAGE, 'admin') !== false));

using it somewhere else (without depressing errors) it evokes error above.