[wp-trac] [WordPress Trac] #57580: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in functions.php

WordPress Trac noreply at wordpress.org
Tue Aug 8 19:08:08 UTC 2023


#57580: strpos(): Passing null to parameter #1 ($haystack) of type string is
deprecated  in functions.php
--------------------------+----------------------
 Reporter:  ipajen        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  General       |     Version:  6.2
 Severity:  normal        |  Resolution:  invalid
 Keywords:  PHP81 close   |     Focuses:
--------------------------+----------------------
Changes (by hellofromTonya):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  6.4 =>


Comment:

 Replying to [comment:6 SergeyBiryukov]:
 > Yeah, I agree we should not duplicate PHP notices. My thinking was more
 along the lines of trying to improve developer experience by providing a
 more comprehensible message where possible, as an extender may not always
 be a seasoned developer, and the PHP notice may not always be clear in
 context, especially if the function is not called directly and the
 incorrect parameter is somewhere in the call stack.

 I think a proposal and/or Trac ticket is needed for a project wide
 architectural discussion and structured approach across all of Core. I
 thought there was a ticket open for it, but not finding it. I'll check
 with @jrf and then move forward to create it if it doesn't exist or create
 a proposal for consideration.

 I do think this ticket can be closed. The issue needs to be fixed in the
 plugin.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57580#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list