Skip to content

Syntax error with constant arrays #199

@mundschenk-at

Description

@mundschenk-at

When a plugin includes constant arrays (a feature since PHP 5.6), the parser throws an error and appears to continue the import, but really skips the file.

Example:

Parse Error: Syntax error, unexpected '[' on line 544Starting import. This will take some time…

The code in question (starting with line 544):

			if ( ! empty( self::COLUMN_FORMAT_STRINGS[ $key ] ) ) {
				$format_strings[] = self::COLUMN_FORMAT_STRINGS[ $key ];
			}

Neither the containing class nor any hooks etc. appear in the generated code reference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions