Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix syntax error #1915

Merged
merged 1 commit into from
Dec 17, 2020
Merged

Fix syntax error #1915

merged 1 commit into from
Dec 17, 2020

Conversation

pschoffer
Copy link
Contributor

@pschoffer pschoffer commented Dec 16, 2020

Description

It seems like yesterdays merge introduced a syntax error.

Changelog Description

Bug fixes

  • Fix syntax error

#1915

Checklist

Please make sure the items below have been covered before requesting a review:

  • This change works and has been tested locally (or has an appropriate fallback).
  • This change works and has been tested on a Go sandbox.
  • This change has relevant unit tests (if applicable).
  • This change has relevant documentation additions / updates (if applicable).
  • (For Automatticians) I've created a changelog draft.

Steps to Test

Running any test reports the issue e.g.:
./bin/phpunit-docker.sh tests/search/includes/classes/test-class-versioning.php

@pschoffer pschoffer requested a review from a team as a code owner December 16, 2020 09:50
@pschoffer pschoffer force-pushed the update/syntax_error_fix branch from 0e40826 to 01eb2ed Compare December 16, 2020 09:54
@@ -101,8 +101,7 @@ public function button_enqueue_scripts() {
wp_enqueue_script( 'purge-page-cache-btn', plugins_url( '/js/admin-bar.js', __FILE__ ), [], '1.1', true );
wp_localize_script( 'purge-page-cache-btn', 'VIPPageFlush', [
'nonce' => wp_create_nonce( 'purge-page' ),
'ajaxurl' => add_query_arg( [ 'action' => 'vip_purge_page_cache' ], admin_url( 'admin-ajax.php' ),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra coma here

Copy link

@netsuso netsuso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

For the record, this throws a syntax error on PHP versions 7.2 and below, while it works for PHP 7.3 and above. But it seems a good idea to fix it anyway.

@pschoffer pschoffer merged commit fc3461b into master Dec 17, 2020
@pschoffer pschoffer deleted the update/syntax_error_fix branch December 17, 2020 08:40
@pschoffer
Copy link
Contributor Author

Stacks-r1311.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants