Changes between Initial Version and Version 1 of Ticket #42814, comment 25
- Timestamp:
- 01/26/2018 09:24:57 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #42814, comment 25
initial v1 1 1 I just ran into this when I began testing with PHP 7.2. In my <head> section of my theme, I call `get_the_excerpt` as part of Open Graph meta tags. I have tried passing the post ID using `get_the_ID`, and passing `$post`, but I can't get rid of the error. 2 3 If we add: 4 5 {{{#!php 6 if ( ! is_array($pages) ) { 7 $pages = []; 8 } 9 }}} 10 11 At line 283 of post-template.php, we correct the issue. Long term, we need to check that all expected arrays are really arrays, and convert `NULL` values to empty arrays before calling `count()`.