Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-14069

Incorrect sql_fetchfield call in style_update_p1 migration

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.5
    • Fix Version/s: 3.1.6-RC1
    • Component/s: Update system
    • Labels:
      None
    • Environment:
      PHP 5.5.9 running on ubuntu

      Description

      On this line:

      https://github.com/phpbb/phpbb/blob/3.1.x/phpBB/phpbb/db/migration/data/v310/style_update_p1.php#L164

      it says:

      			$sql = 'SELECT style_id
      				FROM ' . STYLES_TABLE . "
      				WHERE style_name = 'prosilver'";
      			$result = $this->sql_query($sql);
      			$default_style = $this->db->sql_fetchfield($result);
      			$this->db->sql_freeresult($result);
      

      I got the following error:

      Geïnstalleerde data: \phpbb\db\migration\data\v310\extensions; Tijd: 0.70 secondes
      Geïnstalleerde schema: \phpbb\db\migration\data\v310\style_update_p1; Tijd: 0.14 secondes
      PHP Warning: Illegal offset type in isset or empty in /media/marco/websitesHD/websites/unixerius/git/phpBB31/phpbb/db/driver/driver.php on line 355
      Geïnstalleerde data: \phpbb\db\migration\data\v310\style_update_p1; Tijd: 0.12 secondes
      Geïnstalleerde schema: \phpbb\db\migration\data\v310\style_update_p2; Tijd: 0.26 secondes

      This seems to trace back to the sql_fetchfield() call in line 163 mentioned above. I guess it's not $result that should be passed, but 0 or 'style_id' or sth like that?

        Attachments

          Activity

            People

            • Assignee:
              bantu Andreas Fischer
              Reporter:
              marcovo marcovo
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: