Page MenuHomePhabricator

Possible PHP7 compatibility issues in mediawiki/vendor
Closed, ResolvedPublic

Description

Similar to T173848, output from From https://github.com/sstalle/php7cc

Numerous we don't need to care about (code we don't execute etc), but probably some might want addressing

File: /home/reedy/mediawiki-vendor/zordius/lightncandy/tests/regressionTest.php
> Line 325: [Warning] Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();
> Line 460: [Warning] Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();


File: /home/reedy/mediawiki-vendor/zordius/lightncandy/tests/errorTest.php
> Line 91: [Error] Division by zero
    1 / 0;


File: /home/reedy/mediawiki-vendor/pear/mail_mime-decode/Mail/mimePart.php
> Line 127: [Error] PHP 4 constructors are now deprecated
    function Mail_mimePart($body, $params = array())
    {
    }


File: /home/reedy/mediawiki-vendor/pear/mail_mime-decode/Mail/mimeDecode.php
> Line 116: [Error] PHP 4 constructors are now deprecated
    function Mail_mimeDecode($input, $crlf = '
    ')
    {
    }


File: /home/reedy/mediawiki-vendor/pear/mail_mime-decode/Mail/mime.php
> Line 91: [Error] PHP 4 constructors are now deprecated
    function Mail_mime($crlf = '
    ')
    {
    }


File: /home/reedy/mediawiki-vendor/james-heinrich/getid3/getid3/extension.cache.mysql.php
> Line 91: [Error] Removed function "mysql_pconnect" called
    mysql_pconnect($host, $username, $password);
> Line 97: [Error] Removed function "mysql_select_db" called
    mysql_select_db($database, $this->connection);
> Line 110: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($this->table);
> Line 111: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(\getID3::VERSION);
> Line 115: [Error] Removed function "mysql_query" called
    mysql_query($SQLquery, $this->connection);
> Line 116: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($this->cursor);
> Line 130: [Error] Removed function "mysql_query" called
    mysql_query('DELETE FROM `' . mysql_real_escape_string($this->table) . '`', $this->connection);
> Line 130: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($this->table);
> Line 131: [Error] Removed function "mysql_query" called
    mysql_query('INSERT INTO `' . mysql_real_escape_string($this->table) . '` VALUES (\'' . \getID3::VERSION . '\', -1, -1, -1, \'' . \getID3::VERSION . '\')', $this->connection);
> Line 131: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($this->table);
> Line 147: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($this->table);
> Line 148: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($filename);
> Line 149: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($filesize);
> Line 150: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($filetime);
> Line 151: [Error] Removed function "mysql_query" called
    mysql_query($SQLquery, $this->connection);
> Line 152: [Error] Removed function "mysql_num_rows" called
    mysql_num_rows($this->cursor);
> Line 154: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($this->cursor);
> Line 164: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($this->table);
> Line 165: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($filename);
> Line 166: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($filesize);
> Line 167: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($filetime);
> Line 168: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(time());
> Line 169: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(base64_encode(serialize($analysis)));
> Line 170: [Error] Removed function "mysql_query" called
    mysql_query($SQLquery, $this->connection);
> Line 180: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($this->table);
> Line 187: [Error] Removed function "mysql_query" called
    mysql_query($SQLquery, $this->connection);
> Line 188: [Error] Removed function "mysql_error" called
    mysql_error($this->connection);


File: /home/reedy/mediawiki-vendor/james-heinrich/getid3/demos/demo.audioinfo.class.php
> Line 61: [Error] PHP 4 constructors are now deprecated
    function AudioInfo()
    {
    }


File: /home/reedy/mediawiki-vendor/james-heinrich/getid3/demos/demo.mysql.php
> Line 33: [Error] Removed function "mysql_connect" called
    mysql_connect(GETID3_DB_HOST, GETID3_DB_USER, GETID3_DB_PASS);
> Line 36: [Error] Removed function "mysql_error" called
    mysql_error();
> Line 38: [Error] Removed function "mysql_select_db" called
    mysql_select_db(GETID3_DB_DB);
> Line 41: [Error] Removed function "mysql_error" called
    mysql_error();
> Line 111: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 112: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($from);
> Line 161: [Error] Removed function "mysql_query" called
    mysql_query($SQLquery);
> Line 163: [Error] Removed function "mysql_error" called
    mysql_error();
> Line 164: [Error] Removed function "mysql_error" called
    mysql_error();
> Line 170: [Error] Removed function "mysql_query" called
    mysql_query('DESCRIBE ' . $tablename);
> Line 206: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 211: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 249: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 250: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 255: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 256: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 260: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 261: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 266: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 267: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 271: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 272: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 273: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 274: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 279: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 280: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 281: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 282: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 283: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 284: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 304: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 305: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($filename);
> Line 343: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 356: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 361: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 365: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 366: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($row['filename']);
> Line 381: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 387: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 389: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 390: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($row['filename']);
> Line 402: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 405: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 518: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 519: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['file_modified_time']) ? $ThisFileInfo['file_modified_time'] : '');
> Line 520: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['md5_file']) ? $ThisFileInfo['md5_file'] : '');
> Line 521: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['md5_data']) ? $ThisFileInfo['md5_data'] : '');
> Line 522: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['md5_data_source']) ? $ThisFileInfo['md5_data_source'] : '');
> Line 523: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['filesize']) ? $ThisFileInfo['filesize'] : 0);
> Line 524: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['fileformat']) ? $ThisFileInfo['fileformat'] : '');
> Line 525: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['audio']['dataformat']) ? $ThisFileInfo['audio']['dataformat'] : '');
> Line 526: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['video']['dataformat']) ? $ThisFileInfo['video']['dataformat'] : '');
> Line 527: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['mpeg']['audio']['VBR_method']) ? $ThisFileInfo['mpeg']['audio']['VBR_method'] : '');
> Line 528: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['audio']['bitrate']) ? floatval($ThisFileInfo['audio']['bitrate']) : 0);
> Line 529: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['video']['bitrate']) ? floatval($ThisFileInfo['video']['bitrate']) : 0);
> Line 530: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['playtime_seconds']) ? floatval($ThisFileInfo['playtime_seconds']) : 0);
> Line 531: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['replay_gain']['track']['volume']) ? floatval($ThisFileInfo['replay_gain']['track']['volume']) : 0);
> Line 532: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['comments']) ? serialize($ThisFileInfo['comments']) : '');
> Line 533: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['tags']['id3v2']) ? serialize($ThisFileInfo['tags']['id3v2']) : '');
> Line 534: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['tags']['ape']) ? serialize($ThisFileInfo['tags']['ape']) : '');
> Line 535: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['tags']['lyrics3']) ? serialize($ThisFileInfo['tags']['lyrics3']) : '');
> Line 536: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['tags']['id3v1']) ? serialize($ThisFileInfo['tags']['id3v1']) : '');
> Line 537: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['warning']) ? implode('	', $ThisFileInfo['warning']) : '');
> Line 538: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['error']) ? implode('	', $ThisFileInfo['error']) : '');
> Line 539: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['comments']['album']) ? implode('	', $ThisFileInfo['comments']['album']) : '');
> Line 540: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['comments']['genre']) ? implode('	', $ThisFileInfo['comments']['genre']) : '');
> Line 541: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['comments']['comment']) ? implode('	', $ThisFileInfo['comments']['comment']) : '');
> Line 542: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['comments']['artist']) ? implode('	', $ThisFileInfo['comments']['artist']) : '');
> Line 543: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['tags']) ? implode('	', array_keys($ThisFileInfo['tags'])) : '');
> Line 544: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(trim((!empty($ThisFileInfo['audio']['encoder']) ? $ThisFileInfo['audio']['encoder'] : '') . ' ' . (!empty($ThisFileInfo['audio']['encoder_options']) ? $ThisFileInfo['audio']['encoder_options'] : '')));
> Line 545: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($this_track_title);
> Line 546: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($this_track_remix);
> Line 547: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($this_track_track);
> Line 548: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(isset($ThisFileInfo['filenamepath']) ? $ThisFileInfo['filenamepath'] : '');
> Line 553: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 554: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['filenamepath']) ? $ThisFileInfo['filenamepath'] : '');
> Line 555: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['file_modified_time']) ? $ThisFileInfo['file_modified_time'] : '');
> Line 556: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['md5_file']) ? $ThisFileInfo['md5_file'] : '');
> Line 557: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['md5_data']) ? $ThisFileInfo['md5_data'] : '');
> Line 558: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['md5_data_source']) ? $ThisFileInfo['md5_data_source'] : '');
> Line 559: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['filesize']) ? $ThisFileInfo['filesize'] : 0);
> Line 560: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['fileformat']) ? $ThisFileInfo['fileformat'] : '');
> Line 561: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['audio']['dataformat']) ? $ThisFileInfo['audio']['dataformat'] : '');
> Line 562: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['video']['dataformat']) ? $ThisFileInfo['video']['dataformat'] : '');
> Line 563: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['audio']['bitrate']) ? floatval($ThisFileInfo['audio']['bitrate']) : 0);
> Line 564: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['video']['bitrate']) ? floatval($ThisFileInfo['video']['bitrate']) : 0);
> Line 565: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['playtime_seconds']) ? floatval($ThisFileInfo['playtime_seconds']) : 0);
> Line 567: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['tags']) ? implode('	', array_keys($ThisFileInfo['tags'])) : '');
> Line 568: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['comments']['artist']) ? implode('	', $ThisFileInfo['comments']['artist']) : '');
> Line 569: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($this_track_title);
> Line 570: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($this_track_remix);
> Line 571: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['comments']['album']) ? implode('	', $ThisFileInfo['comments']['album']) : '');
> Line 572: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['comments']['genre']) ? implode('	', $ThisFileInfo['comments']['genre']) : '');
> Line 573: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['comments']['comment']) ? implode('	', $ThisFileInfo['comments']['comment']) : '');
> Line 574: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($this_track_track);
> Line 575: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['comments']) ? serialize($ThisFileInfo['comments']) : '');
> Line 576: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['tags']['id3v2']) ? serialize($ThisFileInfo['tags']['id3v2']) : '');
> Line 577: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['tags']['ape']) ? serialize($ThisFileInfo['tags']['ape']) : '');
> Line 578: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['tags']['lyrics3']) ? serialize($ThisFileInfo['tags']['lyrics3']) : '');
> Line 579: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['tags']['id3v1']) ? serialize($ThisFileInfo['tags']['id3v1']) : '');
> Line 580: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['warning']) ? implode('	', $ThisFileInfo['warning']) : '');
> Line 581: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['error']) ? implode('	', $ThisFileInfo['error']) : '');
> Line 582: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(trim((!empty($ThisFileInfo['audio']['encoder']) ? $ThisFileInfo['audio']['encoder'] : '') . ' ' . (!empty($ThisFileInfo['audio']['encoder_options']) ? $ThisFileInfo['audio']['encoder_options'] : '')));
> Line 583: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['mpeg']['audio']['LAME']) ? 'LAME' : (!empty($ThisFileInfo['mpeg']['audio']['VBR_method']) ? $ThisFileInfo['mpeg']['audio']['VBR_method'] : ''));
> Line 584: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(!empty($ThisFileInfo['replay_gain']['track']['volume']) ? floatval($ThisFileInfo['replay_gain']['track']['volume']) : 0);
> Line 593: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 604: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 608: [Error] Removed function "mysql_num_rows" called
    mysql_num_rows($result);
> Line 609: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 618: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 620: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($row['filename']);
> Line 627: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 628: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($row['filename']);
> Line 639: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 644: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 650: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 651: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($row['filename']);
> Line 660: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 666: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 687: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 688: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($row['filename']);
> Line 710: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 711: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($_REQUEST['encodedbydistribution']);
> Line 715: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 734: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 736: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 749: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 753: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 786: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 790: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 813: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 824: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 837: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 854: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 863: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 874: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 894: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 905: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 918: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 937: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 946: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 953: [Error] Removed function "mysql_num_rows" called
    mysql_num_rows($result);
> Line 957: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 972: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 982: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 989: [Error] Removed function "mysql_num_rows" called
    mysql_num_rows($result);
> Line 993: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1060: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 1066: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1344: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 1354: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1470: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 1471: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($_REQUEST['showtagfiles']);
> Line 1480: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1490: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1502: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 1510: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1524: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 1532: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1543: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 1544: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($_REQUEST['showtagfiles']);
> Line 1553: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1561: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1579: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 1584: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1591: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 1592: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($row['md5_data']);
> Line 1595: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result2);
> Line 1627: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 1628: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($_REQUEST['m3uartist']);
> Line 1629: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($_REQUEST['m3utitle']);
> Line 1632: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1640: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 1653: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1655: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 1656: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($row['artist']);
> Line 1657: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($row['title']);
> Line 1659: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($row['remix']);
> Line 1663: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result2);
> Line 1676: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1687: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 1688: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($row['artist']);
> Line 1689: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($row['title']);
> Line 1692: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result2);
> Line 1742: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 1743: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($fileformat);
> Line 1744: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($audioformat);
> Line 1749: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1761: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 1769: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1779: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1815: [Error] Removed function "mysql_num_rows" called
    mysql_num_rows($result);
> Line 1816: [Error] Removed function "mysql_num_rows" called
    mysql_num_rows($result);
> Line 1820: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1835: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 1841: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1871: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 1876: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1886: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 1894: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1911: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 1912: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($_REQUEST['genredistribution']);
> Line 1918: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1935: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 1941: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1952: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 1962: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1969: [Error] Removed function "mysql_num_rows" called
    mysql_num_rows($result);
> Line 1973: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 1989: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 1994: [Error] Removed function "mysql_num_rows" called
    mysql_num_rows($result);
> Line 1996: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 2015: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 2021: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 2036: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 2037: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string($_REQUEST['vbrmethod']);
> Line 2039: [Error] Removed function "mysql_num_rows" called
    mysql_num_rows($result);
> Line 2040: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 2052: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 2059: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);
> Line 2178: [Error] Removed function "mysql_real_escape_string" called
    mysql_real_escape_string(GETID3_DB_TABLE);
> Line 2180: [Error] Removed function "mysql_fetch_array" called
    mysql_fetch_array($result);


File: /home/reedy/mediawiki-vendor/symfony/process/Tests/ProcessTest.php
> Line 1275: [Warning] "yield" usage in expression context
    $input->onEmpty(function ($input) {
        (yield 'pong');
        $input->close();
    });


File: /home/reedy/mediawiki-vendor/oyejorge/less.php/lib/Less/Functions.php
> Line 535: [Warning] Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();
> Line 930: [Warning] Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();


File: /home/reedy/mediawiki-vendor/ruflin/elastica/lib/Elastica/Index/Stats.php
> Line 68: [Warning] Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();


File: /home/reedy/mediawiki-vendor/ruflin/elastica/lib/Elastica/Node/Stats.php
> Line 60: [Warning] Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();


File: /home/reedy/mediawiki-vendor/ruflin/elastica/lib/Elastica/Node/Info.php
> Line 77: [Warning] Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();


File: /home/reedy/mediawiki-vendor/ruflin/elastica/lib/Elastica/Transport/Null.php
> Line 15: [Error] Reserved name "null" used as a class, interface or trait name
    class Null extends \Elastica\Transport\NullTransport
    {
    }


File: /home/reedy/mediawiki-vendor/ruflin/elastica/lib/Elastica/Query/Bool.php
> Line 16: [Error] Reserved name "bool" used as a class, interface or trait name
    class Bool extends \Elastica\Query\BoolQuery
    {
    }


File: /home/reedy/mediawiki-vendor/wikimedia/remex-html/RemexHtml/TreeBuilder/TreeMutationTracer.php
> Line 88: [Warning] Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();
> Line 93: [Warning] Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();
> Line 105: [Warning] Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();
> Line 118: [Warning] Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();
> Line 126: [Warning] Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();
> Line 140: [Warning] Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();
> Line 151: [Warning] Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();
> Line 157: [Warning] Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();
> Line 164: [Warning] Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();
> Line 171: [Warning] Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();
> Line 180: [Warning] Function argument(s) returned by "func_get_args" might have been modified
    func_get_args();


File: /home/reedy/mediawiki-vendor/wikimedia/purtle/src/RdfWriterBase.php
> Line 206: [Warning] Possible object property creation during by-reference assignment
    $writer->prefixes =& $this->prefixes;


File: /home/reedy/mediawiki-vendor/wikimedia/avro/lib/avro/datum.php
> Line 272: [Error] Bitwise shift by 63 bits
    $n >> 63;


File: /home/reedy/mediawiki-vendor/wikimedia/avro/lib/avro/gmp.php
> Line 91: [Warning] String containing number in hexadecimal notation
    '0x7f';
> Line 106: [Warning] String containing number in hexadecimal notation
    '0xffffffffffffff80';
> Line 121: [Warning] String containing number in hexadecimal notation
    '0xffffffffffffffff';


File: /home/reedy/mediawiki-vendor/nmred/kafka-php/src/Kafka/Protocol/Protocol.php
> Line 167: [Error] Bitwise shift by 32 bits
    ($set[1] & 4294967295) \ 32;
> Line 208: [Error] Bitwise shift by 32 bits
    ($data & $left) >> 32;

Event Timeline

Krinkle renamed this task from Possible MW Vendor PHP 7 issues to Possible PHP7 compatibility issues in mediawiki/vendor.Feb 9 2018, 12:11 AM
Krinkle removed a project: HHVM.

File: /home/reedy/mediawiki-vendor/wikimedia/purtle/src/RdfWriterBase.php
Line 206: [Warning] Possible object property creation during by-reference assignment

This seems to be fine - RdfWriterBase defines $prefixes.

Have rerun php7cc against the latest vendor code and will work off the fresh list to identify any issues that need attention.

Reviewed the potential issues. The vast majority were false positives, and there are no urgent issues. Issues in the following deserve mention:

  • mail_mime-decode (we should remove this completely)
  • getid3 (we don't use the affected functionality)
  • symfony (the affected code can't be triggered on PHP7)
  • Elastica (there are PHP7-friendly alternatives already in the code if we need them)

Details follow.

These are from mail_mime-decode, which should be removed completely:

File: /Users/bpirkle/wmf-git/vendor/pear/mail_mime-decode/Mail/mimeDecode.php
Line 116: [Error] PHP 4 constructors are now deprecated

function Mail_mimeDecode($input, $crlf = '
')
{
}

File: /Users/bpirkle/wmf-git/vendor/pear/mail_mime-decode/Mail/mime.php
Line 91: [Error] PHP 4 constructors are now deprecated

function Mail_mime($crlf = '
')
{
}

File: /Users/bpirkle/wmf-git/vendor/pear/mail_mime-decode/Mail/mimePart.php
Line 127: [Error] PHP 4 constructors are now deprecated

function Mail_mimePart($body, $params = array())
{
}

RECOMMENDED ACTION: per https://phabricator.wikimedia.org/T109121, mail_mime-decode is unused, deprecated, and should be removed from our codebase.

These are from getid3. Having this in the code isn't ideal, but there doesn't appear to be a better solution at the moment.

File: /Users/bpirkle/wmf-git/vendor/james-heinrich/getid3/getid3/extension.cache.mysql.php
Line 91: [Error] Removed function "mysql_pconnect" called

mysql_pconnect($host, $username, $password);

There are numerous other instances in this file of calls to removed mysql functions. We appear to already be running the latest (1.9.15), per https://www.getid3.org/ There's a project that claims to add PHP7 support (https://packagist.org/packages/vkr/getid3) but it still uses the removed functions. It appears we don't use the mysql-based caching functionality, so this won't cause actual problems. But if some code did try to use that functionality on PHP7, it would fail.

RECOMMENDED ACTION: none for now. Upgrade in the future if an upgrade becomes available.

This is from symfony and it looks scary, but turns out to be okay:

File: /Users/bpirkle/wmf-git/vendor/symfony/var-dumper/Caster/ResourceCaster.php
Line 66: [Error] Removed function "mysql_get_host_info" called

mysql_get_host_info($h);

(and two other occurrences of removed functions in that file)

This is a non-issue, because that code won't ever execute on PHP7. From https://github.com/symfony/symfony/issues/16891#issuecomment-162691528 : "with PHP 7 you wouldn't have a mysql resource and thus that caster would never be triggered".

RECOMMENDED ACTION: none

These are from Elastica, and are expected:

File: /Users/bpirkle/wmf-git/vendor/ruflin/elastica/lib/Elastica/Transport/Null.php
Line 15: [Error] Reserved name "null" used as a class, interface or trait name

class Null extends \Elastica\Transport\NullTransport
{
}

File: /Users/bpirkle/wmf-git/vendor/ruflin/elastica/lib/Elastica/Query/Bool.php

Line 16: [Error] Reserved name "bool" used as a class, interface or trait name

class Bool extends \Elastica\Query\BoolQuery
{
}

Comments in the Bool and Null classes mention that they are there for people still on PHP 5, but alternative classes (BoolQuery and NullTransport) are available for PHP 7. We are currently on Elastica 5.3.0, and the Bool and Null classes were removed in Elastica 6.0.1, so when we eventually upgrade, the linter warnings will go away on their own.

RECOMMENDED ACTION: continue to avoid using the Bool and Null classes, use BoolQuery and NullTransport instead

Update: removed mail_mime-decode via T109121. No further action is required, so marking this issue as resolved.