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

Text Reparser fails with empty sql fields

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 4.0.0-a1, 3.2.0-b2
    • 3.2.0-RC1
    • Other
    • None
    • Apache 2.4.7, MySQL 5.6.15, PHP 5.5.8

    Description

      Hello

      In my 3.2x extension, i use Text Reparser plugin in a migration file, because i store text with BBCodes.

      But my sql fields can be empty (like a forum descritpion, or a user signature), and when i enable my extension after an update, i get an error (see screenshot).

      Indeed, content length is shorter than $config['min_post_chars'], and en/posting.php is not included, but I would not have to include this file for reparse a field already stored; empty fields should not be reparsed.

      I suggest to update sql query in phpbb\textreparser\row_based_plugin::get_records_by_range_query like this:

      		$sql = 'SELECT ' . implode(', ', $fields) . '
      			FROM ' . $this->table . '
      			WHERE ' . $columns['id'] . ' BETWEEN ' . $min_id . ' AND ' . $max_id . '
      				AND ' . $columns['text'] . ' <> ""';
      

      for exclude empty fields.

      Attachments

        1. screenshot.JPG
          screenshot.JPG
          168 kB
        2. Capture.JPG
          Capture.JPG
          166 kB

        Activity

          People

            nicofuma nicofuma
            ErnadoO Erwan Nader
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: