@@ -308,10 +308,9 @@ public static function create_fragment( $html, $context = '<body>', $encoding =
308308 }
309309
310310 $ context_node = self ::parse_context_element ( $ context );
311- var_dump ( $ context_node );
312311 if ( null === $ context_node ) {
313312 _doing_it_wrong (
314- __FUNCTION__ ,
313+ __METHOD__ ,
315314 __ ( 'The context argument must be an HTML start tag. ' ),
316315 '6.7.0 '
317316 );
@@ -320,7 +319,7 @@ public static function create_fragment( $html, $context = '<body>', $encoding =
320319
321320 if ( self ::is_void ( $ context_node [0 ] ) ) {
322321 _doing_it_wrong (
323- __FUNCTION__ ,
322+ __METHOD__ ,
324323 __ ( 'The context argument may not specify a void element. ' ),
325324 '6.7.0 '
326325 );
@@ -329,7 +328,7 @@ public static function create_fragment( $html, $context = '<body>', $encoding =
329328
330329 if ( in_array ( $ context_node [0 ], array ( 'IFRAME ' , 'NOEMBED ' , 'NOFRAMES ' , 'SCRIPT ' , 'STYLE ' , 'TEXTAREA ' , 'TITLE ' , 'XMP ' ), true ) ) {
331330 _doing_it_wrong (
332- __FUNCTION__ ,
331+ __METHOD__ ,
333332 __ ( 'The context argument may not specify a self-contained element. ' ),
334333 '6.7.0 '
335334 );
@@ -387,7 +386,7 @@ public static function create_fragment( $html, $context = '<body>', $encoding =
387386 * @return array|null Element name and associative array of attributes if parsed, otherwise NULL.
388387 */
389388 private static function parse_context_element ( $ context = '<body> ' ): ?array {
390- if ( '<body> ' ! == $ context ) {
389+ if ( '<body> ' = == $ context ) {
391390 return array ( 'BODY ' , array () );
392391 }
393392
0 commit comments