PDO Exception in menu_clone_load() with PHP 8.1

Created on 8 March 2024, 4 months ago

Steps to reproduce

When using PHP 8.1, hard crash when creating, editing, or listing links for a menu
PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens...

Proposed resolution

In line 111 of menu_clone.module, the sql token is incorrectly enclosed in quotation marks.

  $sql = "SELECT menu_name FROM {menu_custom} WHERE menu_name = ':name'";

I will create a patch and submit it in a subsequent comment.

πŸ› Bug report
Status

Active

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States illeace

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

Comments & Activities

  • Issue created by @illeace
  • πŸ‡ΊπŸ‡ΈUnited States illeace

    Here's the patch. Note: it appears this bug was fixed in the `7.x-1.x` branch, but not released. This patch will apply to the last released version `7.x-1.0-beta2`.

Production build 0.69.0 2024