Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-14973

PHP 7.2 count() - SYNTAX error in sql.lib.php

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Incomplete
    • Affects Version/s: 10.3.3
    • Fix Version/s: N/A
    • Component/s: OTHER
    • Labels:
    • Environment:
      Ubuntu 16.04, PHP 7.2.1

      Description

      When accessing phpMyAdmin I get the following error:

      Warning in ./libraries/sql.lib.php#601
      count(): Parameter must be an array or an object that implements Countable

      Backtrace

      ./libraries/sql.lib.php#2038: PMA_isRememberSortingOrder(array)
      ./libraries/sql.lib.php#1984: PMA_executeQueryAndGetQueryResponse(
      array,
      boolean true,
      string 'holding',
      string 'users',
      NULL,
      NULL,
      NULL,
      NULL,
      NULL,
      NULL,
      string '',
      string './themes/pmahomme/img/',
      NULL,
      NULL,
      NULL,
      string 'SELECT * FROM `users`',
      NULL,
      NULL,
      )
      ./sql.php#216: PMA_executeQueryAndSendQueryResponse(
      array,
      boolean true,
      string 'holding',
      string 'users',
      NULL,
      NULL,
      NULL,
      NULL,
      NULL,
      NULL,
      string '',
      string './themes/pmahomme/img/',
      NULL,
      NULL,
      NULL,
      string 'SELECT * FROM `users`',
      NULL,
      NULL,
      )

      This is fixed by editing file ./libraries/sql.lib.php line 601.
      Replace: || (count($analyzed_sql_results['select_expr'] == 1)
      With: || (count($analyzed_sql_results['select_expr']) == 1

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              THughes90 Thomas Hughes
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: