[wp-trac] [WordPress Trac] #61717: Warning: Trying to access array offset on value of type bool in /sites/site.com/wp-includes/media.php on line 795 801

WordPress Trac noreply at wordpress.org
Wed Jul 24 15:21:46 UTC 2024


#61717: Warning: Trying to access array offset on value of type bool in
/sites/site.com/wp-includes/media.php on line 795 801
-------------------------------------------+-------------------------------
 Reporter:  vladte4                        |       Owner:  (none)
     Type:  defect (bug)                   |      Status:  new
 Priority:  normal                         |   Milestone:  Awaiting Review
Component:  Media                          |     Version:  6.6
 Severity:  major                          |  Resolution:
 Keywords:  needs-patch reporter-feedback  |     Focuses:  coding-standards
-------------------------------------------+-------------------------------
Changes (by antpb):

 * keywords:  needs-patch => needs-patch reporter-feedback


Comment:

 We've seen recent reports similar to this issue (example: #59573) It might
 be worth adding a bool check to be safe here and avoid future reports. It
 would be nice to understand more what value is being passed through here
 to better understand why we are making the change.

 @vladte4 thanks for this report and all the info! One thing we are still
 lacking to diagnose the issue is the call stack that is resulting in the
 error. Is there any way that you can share with us the calls that are
 triggering the warning? Knowing if it is a theme or plugin, a certain
 function, or any other information about where its coming from would be
 very helpful. I'd like to better understand how a bool is getting to this
 point in the code so we can bypass this logic in the case of a bool.

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


More information about the wp-trac mailing list