Uploaded image for project: 'Support Team Tools'
  1. Support Team Tools
  2. STT-320

MySQL Upgrader - Illegal string offset 'limit'

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Resolution: Fixed
    • Component/s: Support Toolkit
    • Labels:
      None

      Description

      When running the MySQL Upgrader tool (STK 1.0.7) running on PHP 5.4.3 multiple lines of

      [phpBB Debug] PHP Warning: in file [ROOT]/tools/support/mysql_upgrader.php on line 157: Illegal string offset 'limit'

      are generated.

      PHP Manual - Strings shows

      As of PHP 5.4 string offsets have to either be integers or integer-like strings, otherwise a warning will be thrown. Previously an offset like "foo" was silently cast to 0.


      From some quick testing replacing lines 155-157 in tools/support/mysql_upgrader.php

      					if (isset($umil->db_tools->dbms_type_map['mysql_40'][$orig_column_type . ':']['limit'][0]))
      					{
      						switch ($umil->db_tools->dbms_type_map['mysql_40'][$orig_column_type . ':']['limit'][0])

      with

      					if (isset($umil->db_tools->dbms_type_map['mysql_40'][$orig_column_type . ':'][0]))
      					{
      						switch ($umil->db_tools->dbms_type_map['mysql_40'][$orig_column_type . ':'][0])

      worked, but not sure if that creates any other problems.

        Attachments

          Activity

            People

            • Assignee:
              Noxwizard Patrick Webster
              Reporter:
              Oyabun1 Oyabun1 [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: