XMLWordPrintable

Details

    • Sub-task
    • Resolution: Fixed
    • Minor
    • 4.1
    • 3.11.4, 4.1
    • Other

    Description

      One of the changes in PHP8.1 is that the functions that accept string arguments no longer accept null. For backward-compatibility we want to ensure that all functions in the core_text class do not show any debugging messages when we pass null.

      Passing null to a non-nullable argument of a built-in function is
          deprecated. This matches the behavior of user-defined functions, where null
          is never accepted by non-nullable arguments.
          user-defined functions.
       
              var_dump(str_contains("foobar", null));
              // Deprecated: Passing null to parameter #2 ($needle) of type string
              //             is deprecated
      
      

      RFC: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg

      Attachments

        Activity

          People

            marina Marina Glancy
            marina Marina Glancy
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Jun Pataleta Jun Pataleta
            CiBoT CiBoT
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              28/Nov/22

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h