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

MySQL Upgrader - Illegal string offset 'limit'

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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.

            Noxwizard Patrick Webster
            Oyabun1 Oyabun1 [X] (Inactive)
            Archiver:
            Noxwizard Patrick Webster

              Created:
              Updated:
              Resolved:
              Archived: