Skip to:
Content

bbPress.org

Changeset 7281

Timestamp:
07/11/2024 11:11:14 PM (2 months ago)
Author:
johnjamesjacoby
Message:

Core: small updates to bbPress()->data

This change tweaks the code commentary a bit, and adds a default value of an empty array.

This is largely for the sake of code cleanliness, but also removes the potential for debug notices or errors inside of the magic methods from data not being initialized as an array when they are first called.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bbpress.php

    r7268 r7281  
    4545    /**
    4646     * bbPress uses many variables, several of which can be filtered to
    47      * customize the way it operates. Most of these variables are stored in a
    48      * private array that gets updated with the help of PHP magic methods.
     47     * customize the way it operates. Most of th
     48     * private array PHP magic methods.
    4949     *
    5050     * This is a precautionary measure, to avoid potential errors produced by
    51      * unanticipated direct manipulation of run-time data.
     51     * unanticipated direct manipulation of run-time data.
    5252     *
    5353     * @see bbPress::setup_globals()
    5454     * @var array
    5555     */
    56     private $data;
     56    private $data;
    5757
    5858    /** Not Magic *************************************************************/
Note: See TracChangeset for help on using the changeset viewer.