Error: syntax error, unexpected ')'

Created on 15 September 2021, almost 3 years ago
Updated 25 August 2023, 10 months ago

Problem/Motivation

PHP Parse error: syntax error, unexpected ')' in /src/Form/EditorImagePopupDialog.php on line 46

  public static function create(ContainerInterface $container) {
    return new static(
      $container->get('entity_type.manager'),
    );
  }

Steps to reproduce

Installed version 2.x-dev; running Drush command drush cr will terminate abnormally due to an unrecoverable error.

Proposed resolution

Remove the trailing comma, a trailing comma is only allowed in array() or list() constructs.

  public static function create(ContainerInterface $container) {
    return new static(
      $container->get('entity_type.manager')
    );
  }
🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇳🇱Netherlands LaurentD

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024