Skip to content

PHP Warnings during WXR Import due to incomplete fix #2579

@dd32

Description

@dd32

The below PHP Warnings are thrown during WXR imports that contain terms:

PHP Warning:  Undefined variable $term in /internal/eval.php on line 22
PHP Warning:  Trying to access array offset on null in /internal/eval.php on line 22

This is caused by #1997 / #1996 / 2b00b04

if ( 'wp_theme' !== $term['taxonomy'] ) continue; evaluates to if ( 'wp_theme' !== null ) continue;, as such the code never does anything.

Since the above change never actually did anything, I guess #1996 is still a problem.

This would likely resolve it, but I'd rather RM the code.

-foreach ( $terms as $post_term ) {
+foreach ( $terms as $term ) {

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions