Ignore:
Timestamp:
Nov 14, 2020 4:50:42 PM (4 years ago)
Author:
anonymous
Message:

Fix 'Array and string offset access syntax with curly braces is deprecated'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/ImageThumb.inc.php

    r648 r737  
    386386
    387387            // Destination filename uses the extension defined by dest_file_extension.
    388             if ('/' == $spec['dest_dir']{0}) {
     388            if ('/' == $spec['dest_dir'][0]) {
    389389                // Absolute path.
    390390                $dest_file = sprintf('%s/%s.%s', $spec['dest_dir'], mb_substr($file_name, 0, mb_strrpos($file_name, '.')), $spec['dest_file_extension']);
     
    675675        foreach ($this->_image_specs as $spec) {
    676676            // Get base directory depending on if the spec's dest_dir is an absolute path or not.
    677             $dest_dir = '/' == $spec['dest_dir']{0} ? $spec['dest_dir'] : sprintf('%s/%s', $this->getParam('source_dir'), $spec['dest_dir']);
     677            $dest_dir = '/' == $spec['dest_dir'][0] ? $spec['dest_dir'] : sprintf('%s/%s', $this->getParam('source_dir'), $spec['dest_dir']);
    678678            if ($use_glob) {
    679679                $dest_file = realpath(sprintf('%s/%s', $dest_dir, $this->_glob($file_name, $dest_dir)));
     
    789789                } else {
    790790                    // Get base directory depending on if the spec's dest_dir is an absolute path or not.
    791                     $dest_dir = '/' == $spec['dest_dir']{0} ? $spec['dest_dir'] : sprintf('%s/%s', $this->getParam('source_dir'), $spec['dest_dir']);
     791                    $dest_dir = '/' == $spec['dest_dir'][0] ? $spec['dest_dir'] : sprintf('%s/%s', $this->getParam('source_dir'), $spec['dest_dir']);
    792792                }
    793793                if (!file_exists($dest_dir)) {
Note: See TracChangeset for help on using the changeset viewer.