Skip to content

PHP 8.2 dynamic property deprecations: CAppUI, TitleBlock, Permissions, Mail and CFile (via w2p_FileSystem_Local) #555

Open

Description

@caseysoftware

Found on: master @ 8727ad5 (5.0.0-rc3), PHP 8.3.6.

These core classes create properties they don't declare. Each one logs Creation of dynamic property ... is deprecated on PHP 8.2+ and will be an error once dynamic properties are removed:

Class Properties Where it's set
w2p_Core_CAppUI $project_id, $boxTopRendered Set by modules and the theme, logged at session_start() (classes/w2p/System/Session.class.php:238) on every request
w2p_Theme_TitleBlock $cells1, $cells2, $crumbs, $showhelp, $count TitleBlock.class.php:44–48, every page with a title block
w2p_Extensions_Permissions $db Permissions.class.php:43
w2p_Utilities_Mail $canEncode, $hasMbStr, $charset Mail.class.php:77–90, every e-mail
CFile $_filepath Set from outside the class by w2p_FileSystem_Local::moveTemp() (FileSystem/Local.class.php:79), every upload

Suggested fix: declare the properties (protected where nothing outside the class reads them). For CFile, add public $_filepath or have moveTemp() return the path instead of setting it on the object.

The cleanup baseline already lists this as item 24. This issue gives the specific list so it can be closed off.

Effort: XS.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions