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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Incomplete
    • 10.3.3
    • N/A
    • OTHER
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.