The website encountered an unexpected error. ParseError: syntax error, unexpected '=' in

Created on 7 April 2023, over 2 years ago

Problem/Motivation

ParseError: syntax error, unexpected '=' in menu_execute_active_handler() (line 1382 of /sites/all/modules/taxonomy_manager/taxonomy_manager.admin.inc).

Steps to reproduce

I am getting this error after updating module from 1.1 to 1.2

🐛 Bug report
Status

Active

Version

1.2

Component

Code

Created by

🇮🇳India devendra mishra Noida

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

Comments & Activities

  • Issue created by @devendra mishra
  • 🇩🇪Germany yan

    Similar here when I try to open Taxonomy Manager:

    ParseError: syntax error, unexpected ',', expecting ']' in menu_execute_active_handler() (Zeile 1382 von /sites/all/modules/contrib/taxonomy_manager/taxonomy_manager.admin.inc).

    Version: 7.x-1.2

  • First commit to issue fork.
  • Assigned to shalini_jha
  • 🇮🇳India shalini_jha

    I am checking this issue.

  • Issue was unassigned.
  • Status changed to Needs review almost 2 years ago
  • 🇮🇳India shalini_jha

    Hi @Devendra Mishra
    I can not able to reproduce this issue, as the taxonomy manager is working fine for me.
    I am using Drupal core 7.80 , Module Version: 7.x-1.2

  • 🇮🇳India muniraj.m Chennai

    Hi @yan, this error might be due to the usage of older PHP version. For example, if you are using PHP 5.6 then it will throw this error. Use the latest compatible PHP version.

  • 🇩🇪Germany yan

    Thanks muniraj.m. I'm using PHP 7.0.33 in this case. I'll try to update to a newer version.

  • 🇷🇺Russia Andrew Answer Novosibirsk

    Problem is here (taxonomy_manager.admin.inc, line 1382):

    [, , $bundle] = entity_extract_ids('taxonomy_term', $entity);
    

    It is not supported in PHP 7.0.x.

    You should rewrite it as

    $ar = entity_extract_ids('taxonomy_term', $entity);
    $bundle = $ar[2];
    
  • 🇩🇪Germany yan

    Thanks @andrew-answer, that work-around does solve it for now. I imagine that there is no intention to maintain downwards compatibility to PHP 7.0, so probably we'll just leave it at that (and update to a higher PHP version).

  • Status changed to Closed: outdated 15 days ago
  • 🇦🇺Australia VladimirAus Brisbane, Australia

    Thank you for contribution. 👍
    Drupal 7 is no longer supported. 🤷‍♂️
    Closing as outdated. 🔐

Production build 0.71.5 2024