Make WordPress Core


Ignore:
Timestamp:
04/20/2020 11:11:48 AM (5 years ago)
Author:
SergeyBiryukov
Message:

External Libraries: Update getID3() to 1.9.19.

Changelog: https://github.com/JamesHeinrich/getID3/compare/v1.9.18...v1.9.19

Props ayeshrajans, schlessera.
See #49945.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ID3/getid3.lib.php

    r46586 r47601  
    1616{
    1717    /**
    18      * @param string $string
    19      * @param bool   $hex
    20      * @param bool   $spaces
    21      * @param string $htmlencoding
     18     * @param string      $string
     19     * @param bool        $hex
     20     * @param bool        $spaces
     21     * @param string|bool $htmlencoding
    2222     *
    2323     * @return string
     
    217217            default:
    218218                return false;
    219                 break;
    220219        }
    221220        if ($floatvalue >= 0) {
     
    285284                }
    286285                return $floatvalue;
    287                 break;
    288286
    289287            default:
    290288                return false;
    291                 break;
    292289        }
    293290        $exponentstring = substr($bitword, 1, $exponentbits);
     
    501498
    502499    /**
    503      * @param array $array1
    504      * @param array $array2
     500     * @param mixed $array1
     501     * @param mixed $array2
    505502     *
    506503     * @return array|false
     
    524521
    525522    /**
    526      * @param array $array1
    527      * @param array $array2
     523     * @param mixed $array1
     524     * @param mixed $array2
    528525     *
    529526     * @return array|false
     
    545542
    546543    /**
    547      * @param array $array1
    548      * @param array $array2
     544     * @param mixed $array1
     545     * @param mixed $array2
    549546     *
    550547     * @return array|false|null
     
    736733
    737734    /**
    738     * @param SimpleXMLElement|array $XMLobject
     735    * @param SimpleXMLElement|array|mixed $XMLobject
    739736    *
    740     * @return array
     737    * @return mixed
    741738    */
    742739    public static function SimpleXMLelement2array($XMLobject) {
     
    14801477     */
    14811478    public static function GetDataImageSize($imgData, &$imageinfo=array()) {
     1479        if (PHP_VERSION_ID >= 50400) {
     1480            $GetDataImageSize = @getimagesizefromstring($imgData, $imageinfo);
     1481            if ($GetDataImageSize === false || !isset($GetDataImageSize[0], $GetDataImageSize[1])) {
     1482                return false;
     1483            }
     1484            $GetDataImageSize['height'] = $GetDataImageSize[0];
     1485            $GetDataImageSize['width'] = $GetDataImageSize[1];
     1486            return $GetDataImageSize;
     1487        }
    14821488        static $tempdir = '';
    14831489        if (empty($tempdir)) {
     
    14881494            // yes this is ugly, feel free to suggest a better way
    14891495            if (include_once(dirname(__FILE__).'/getid3.php')) {
    1490                 if ($getid3_temp = new getID3()) {
    1491                     if ($getid3_temp_tempdir = $getid3_temp->tempdir) {
    1492                         $tempdir = $getid3_temp_tempdir;
    1493                     }
    1494                     unset($getid3_temp, $getid3_temp_tempdir);
    1495                 }
     1496                $getid3_temp = new getID3();
     1497                if ($getid3_temp_tempdir = $getid3_temp->tempdir) {
     1498                    $tempdir = $getid3_temp_tempdir;
     1499                }
     1500                unset($getid3_temp, $getid3_temp_tempdir);
    14961501            }
    14971502        }
     
    15691574                                    $ThisFileInfo['comments'][$tagname][$key] = $value;
    15701575                                } else {
    1571                                     if (isset($ThisFileInfo['comments'][$tagname])) {
     1576                                    if (!isset($ThisFileInfo['comments'][$tagname])) {
    15721577                                        $ThisFileInfo['comments'][$tagname] = array($value);
    15731578                                    } else {
Note: See TracChangeset for help on using the changeset viewer.