Wordpress foutcode: Warning: preg_match_all() expects parame

Pagina: 1
Acties:
  • 227 views

Acties:
  • 0 Henk 'm!

  • Vol Braakzakje
  • Registratie: September 2017
  • Laatst online: 18-03 01:22
Beste Tweakers,

Hopelijk mag ik hier om hulp vragen? Mijn website krijgt constant de volgende erros:
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
En de regels die ik uit formatting.php haal (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.
_wptexturize_pushpop_element( $curl, $no_texturize_shortcodes_stack, $no_texturize_shortcodes );
} else {
// Looks like an escaped shortcode.
continue;
}

} elseif ( empty( $no_texturize_shortcodes_stack ) && empty( $no_texturize_tags_stack ) ) {
// This is neither a delimiter, nor is this content inside of no_texturize pairs. Do texturize.

$curl = str_replace( $static_characters, $static_replacements, $curl );

if ( false !== strpos( $curl, "'" ) ) {
$curl = preg_replace( $dynamic_characters['apos'], $dynamic_replacements['apos'], $curl );
$curl = wptexturize_primes( $curl, "'", $prime, $open_sq_flag, $closing_single_quote );
$curl = str_replace( $apos_flag, $apos, $curl );
$curl = str_replace( $open_sq_flag, $opening_single_quote, $curl );
}
if ( false !== strpos( $curl, '"' ) ) {
$curl = preg_replace( $dynamic_characters['quote'], $dynamic_replacements['quote'], $curl );
$curl = wptexturize_primes( $curl, '"', $double_prime, $open_q_flag, $closing_quote );
$curl = str_replace( $open_q_flag, $opening_quote, $curl );
}
if ( false !== strpos( $curl, '-' ) ) {
$curl = preg_replace( $dynamic_characters['dash'], $dynamic_replacements['dash'], $curl );
}

// 9x9 (times), but never 0x9999
if ( 1 === preg_match( '/(?<=\d)x\d/', $curl ) ) {
// Searching for a digit is 10 times more expensive than for the x, so we avoid doing this one!
$curl = preg_replace( '/\b(\d(?(?<=0)[\d\.,]+|[\d\.,]*))x(\d[\d\.,]*)\b/', '$1×$2', $curl );
}

// 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 );
}
}

return implode( '', $textarr );
}
Kan iemand hier uithalen wat er fout is? Naar mijn idee klopt het gewoon?

Acties:
  • 0 Henk 'm!

  • DJMaze
  • Registratie: Juni 2002
  • Niet online
Verwijder eens al je plugins

Maak je niet druk, dat doet de compressor maar


Acties:
  • 0 Henk 'm!

  • RobIII
  • Registratie: December 2001
  • Niet online

RobIII

Admin Devschuur®

^ Romeinse Ⅲ ja!

(overleden)
Dat mag altijd, maar het is dan wel de bedoeling dat je onze Quickstart hanteert. M.a.w.: wat heb je zelf al gezocht, gevonden, geprobeerd etc.? Verder kun je voor 't posten van code code tags gebruiken.

Nadat je @DJMaze's tip hebt geprobeerd en 't werkt nog niet, open dan gerust een nieuw topic (doe dat dan ook even in 't juiste forum; zie Waar hoort mijn topic?) maar hanteer dan voorgenoemde quickstart even; dan komt 't helemaal goed ;)

[ Voor 11% gewijzigd door RobIII op 06-12-2017 16:42 ]

There are only two hard problems in distributed systems: 2. Exactly-once delivery 1. Guaranteed order of messages 2. Exactly-once delivery.

Je eigen tweaker.me redirect

Over mij


Dit topic is gesloten.