ed in PHP 8.5. * * Returns the first element of an array. * * @since 6.9.0 * * @param array $array The array to get the first element from. * @return mixed|null The first element of the array, or null if the array is empty. */ function array_first( array $array ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.arrayFound if ( empty( $array ) ) { return null; } foreach ( $array as $value ) { return $value; } } } if ( ! function_exists( 'array_last' ) ) { /** * Polyfill for `array_last()` function added in PHP 8.5. * * Returns the last element of an array. * * @since 6.9.0 * * @param array $array The array to get the last element from. * @return mixed|null The last element of the array, or null if the array is empty. */ function array_last( array $array ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.arrayFound if ( empty( $array ) ) { return null; } return $array[ array_key_last( $array ) ]; } } // IMAGETYPE_AVIF constant is only defined in PHP 8.x or later. if ( ! defined( 'IMAGETYPE_AVIF' ) ) { define( 'IMAGETYPE_AVIF', 19 ); } // IMG_AVIF constant is only defined in PHP 8.x or later. if ( ! defined( 'IMG_AVIF' ) ) { define( 'IMG_AVIF', IMAGETYPE_AVIF ); } // IMAGETYPE_HEIF constant is only defined in PHP 8.5 or later. if ( ! defined( 'IMAGETYPE_HEIF' ) ) { define( 'IMAGETYPE_HEIF', 20 ); }
Fatal error: Uncaught Error: Call to undefined function str_contains() in /home/cronkelg/public_html/wp-includes/load.php:1920 Stack trace: #0 /home/cronkelg/public_html/wp-includes/default-constants.php(43): wp_convert_hr_to_bytes('128m') #1 /home/cronkelg/public_html/wp-settings.php(66): wp_initial_constants() #2 /home/cronkelg/public_html/wp-config.php(99): require_once('/home/cronkelg/...') #3 /home/cronkelg/public_html/wp-load.php(50): require_once('/home/cronkelg/...') #4 /home/cronkelg/public_html/wp-blog-header.php(16): require_once('/home/cronkelg/...') #5 /home/cronkelg/public_html/index.php(17): require('/home/cronkelg/...') #6 {main} thrown in /home/cronkelg/public_html/wp-includes/load.php on line 1920