Complex probleem: Warning: preg_match_all() expects parameter 2 to be string
-
Hallo,
Ik krijg steeds deze melding en ik kan zelf niet goed zien wat er nu mis is. Alles lijkt me gewoon te kloppen. Kan iemand me misschien helpen?
Warning: preg_match_all() expects parameter 2 to be string, array given in /home/users/xxx/xxx/wp-includes/formatting.php on line 229 Warning: array_intersect(): Argument #2 is not an array in /home/users/xxx/xxx/wp-includes/formatting.php on line 230 Warning: preg_split() expects parameter 2 to be string, array given in /home/users/xxx/xxx/wp-includes/formatting.php on line 235 Warning: Invalid argument supplied for foreach() in /home/users/xxx/xxx/wp-includes/formatting.php on line 237 Warning: implode(): Invalid arguments passed in /home/users/xxx/xxx/wp-includes/formatting.php on line 299
Dit zijn de regels 229 t/m 299
preg_match_all( '@\[/?([^<>&/\[\]\x00-\x20=]++)@', $text, $matches ); $tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] ); $found_shortcodes = ! empty( $tagnames ); $shortcode_regex = $found_shortcodes ? _get_wptexturize_shortcode_regex( $tagnames ) : ''; $regex = _get_wptexturize_split_regex( $shortcode_regex ); $textarr = preg_split( $regex, $text, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY ); foreach ( $textarr as &$curl ) { // Only call _wptexturize_pushpop_element if $curl is a delimiter. $first = $curl[0]; if ( '<' === $first ) { if ( '<!--' === substr( $curl, 0, 4 ) ) { // This is an HTML comment delimiter. continue; } else { // This is an HTML element delimiter. // Replace each & with & unless it already looks like an entity. $curl = preg_replace( '/&(?!#(?:\d+|x[a-f0-9]+);|[a-z1-4]{1,8};)/i', '&', $curl ); _wptexturize_pushpop_element( $curl, $no_texturize_tags_stack, $no_texturize_tags ); } } elseif ( '' === trim( $curl ) ) { // This is a newline between delimiters. Performance improves when we check this. continue; } elseif ( '[' === $first && $found_shortcodes && 1 === preg_match( '/^' . $shortcode_regex . '$/', $curl ) ) { // This is a shortcode delimiter. if ( '[[' !== substr( $curl, 0, 2 ) && ']]' !== substr( $curl, -2 ) ) { // Looks like a normal shortcode. _wptextu
2 reacties aan het bekijken - 1 tot 2 (van in totaal 2)
2 reacties aan het bekijken - 1 tot 2 (van in totaal 2)
- Het onderwerp ‘Complex probleem: Warning: preg_match_all() expects parameter 2 to be string’ is gesloten voor nieuwe reacties.