Make WordPress Core

Changeset 60812


Ignore:
Timestamp:
09/29/2025 07:11:01 PM (7 weeks ago)
Author:
swissspidy
Message:

External Libraries: Backport upstream PHP 8.5 fixes for getID3.

In absence of a new release, this cherry-picks 8cb29233 and dbda40de.

Props swissspidy, vidugupta, TobiasBg, desrosj.
Fixes #64051. See #63061.

Location:
trunk/src/wp-includes/ID3
Files:
3 edited

Legend:

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

    r56975 r60812  
    17891789        }
    17901790        if (isset($commandline)) {
    1791             $output = trim(`$commandline`);
     1791            $output = trim(shell_exec($commandline));
    17921792            if (ctype_digit($output)) {
    17931793                $filesize = (float) $output;
  • trunk/src/wp-includes/ID3/getid3.php

    r60800 r60812  
    482482                        if (!empty($path_so_far)) {
    483483                            $commandline = 'dir /x '.escapeshellarg(implode(DIRECTORY_SEPARATOR, $path_so_far));
    484                             $dir_listing = `$commandline`;
     484                            $dir_listing = shell_exec($commandline);
    485485                            $lines = explode("\n", $dir_listing);
    486486                            foreach ($lines as $line) {
     
    18101810
    18111811                        $commandline = '"'.GETID3_HELPERAPPSDIR.'vorbiscomment.exe" -w -c "'.$empty.'" "'.$file.'" "'.$temp.'"';
    1812                         $VorbisCommentError = `$commandline`;
     1812                        $VorbisCommentError = shell_exec($commandline);
    18131813
    18141814                    } else {
     
    18211821
    18221822                    $commandline = 'vorbiscomment -w -c '.escapeshellarg($empty).' '.escapeshellarg($file).' '.escapeshellarg($temp).' 2>&1';
    1823                     $VorbisCommentError = `$commandline`;
     1823                    $VorbisCommentError = shell_exec($commandline);
    18241824
    18251825                }
  • trunk/src/wp-includes/ID3/module.audio.ogg.php

    r56975 r60812  
    788788                    case 'rg_audiophile':
    789789                    case 'replaygain_album_gain':
    790                         $info['replay_gain']['album']['adjustment'] = (double) $commentvalue[0];
     790                        $info['replay_gain']['album']['adjustment'] = (float) $commentvalue[0];
    791791                        unset($info['ogg']['comments'][$index]);
    792792                        break;
     
    794794                    case 'rg_radio':
    795795                    case 'replaygain_track_gain':
    796                         $info['replay_gain']['track']['adjustment'] = (double) $commentvalue[0];
     796                        $info['replay_gain']['track']['adjustment'] = (float) $commentvalue[0];
    797797                        unset($info['ogg']['comments'][$index]);
    798798                        break;
    799799
    800800                    case 'replaygain_album_peak':
    801                         $info['replay_gain']['album']['peak'] = (double) $commentvalue[0];
     801                        $info['replay_gain']['album']['peak'] = (float) $commentvalue[0];
    802802                        unset($info['ogg']['comments'][$index]);
    803803                        break;
     
    805805                    case 'rg_peak':
    806806                    case 'replaygain_track_peak':
    807                         $info['replay_gain']['track']['peak'] = (double) $commentvalue[0];
     807                        $info['replay_gain']['track']['peak'] = (float) $commentvalue[0];
    808808                        unset($info['ogg']['comments'][$index]);
    809809                        break;
    810810
    811811                    case 'replaygain_reference_loudness':
    812                         $info['replay_gain']['reference_volume'] = (double) $commentvalue[0];
     812                        $info['replay_gain']['reference_volume'] = (float) $commentvalue[0];
    813813                        unset($info['ogg']['comments'][$index]);
    814814                        break;
Note: See TracChangeset for help on using the changeset viewer.