esmero / format_strawberryfield

Set of Display formatters, extractors and utils to make Strawberry field data glow
GNU Lesser General Public License v3.0
6 stars 9 forks source link

Brackets in StrawberryPagedFormatter.php IF clause wrong, default value is always supplied instead of settings value #425

Closed roromedia closed 6 months ago

roromedia commented 6 months ago

In file StrawberryPagedFormatter.php the brackets of two IF clauses are set wrong, therefore settings won't get applied. Here are the line numbers and the correct code:

Line 494:

if ($this->getSetting('ia_reader_images_base_url') &&
      is_string($this->getSetting('ia_reader_images_base_url'))
      && strlen(trim($this->getSetting('ia_reader_images_base_url'))) > 1) {
      $ia_reader_images_base_url = trim($this->getSetting('ia_reader_images_base_url'));
    }

Line 673:

if ($this->getSetting('ia_reader_images_base_url') &&
      is_string($this->getSetting('ia_reader_images_base_url'))
        && strlen(trim($this->getSetting('ia_reader_images_base_url'))) > 1) {
      $ia_reader_images_base_url = trim($this->getSetting('ia_reader_images_base_url'));
    }
DiegoPino commented 6 months ago

@roromedia can you please make a pull? thanks

DiegoPino commented 6 months ago

Fixed via https://github.com/esmero/format_strawberryfield/commit/b412e3ed4ca0c0c28ba2d9d695fe16a5c8cd8cc9 by @roromedia. Thanks!