Project

General

Profile

Actions

Bug #35904

closed

Found some deprecated functions in the core

Added by Frank Nägler over 12 years ago. Updated almost 11 years ago.

Status:
Rejected
Priority:
Won't have this time
Assignee:
-
Category:
-
Target version:
-
Start date:
2012-04-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I have found some PHP 5.3 deprecated functions in the core.
please check the list below.

checking for 'dl()'

typo3/sysext/em/classes/parser/class.tx_em_parser_xmlabstractparser.php:77:            if (!((bool) ini_get('enable_dl') && !(bool) ini_get('safe_mode') && function_exists('dl') && dl($prefix . $this->requiredPHPExt . PHP_SHLIB_SUFFIX))) {
typo3/sysext/openid/lib/php-openid/Auth/OpenID/BigMath.php:380:                if (@dl($module . "." . PHP_SHLIB_SUFFIX)) {
typo3/sysext/openid/lib/php-openid/Auth/Yadis/XML.php:352:                if (@dl($libname)) {
typo3/sysext/adodb/adodb/adodb-pear.inc.php:365:            @dl($name . $dlext);

checking for 'eregi()'

ChangeLog:13188:    * t3lib_install: Changed an eregi() to a matching preg_match()

checking for 'set_magic_quotes_runtime()'

typo3/sysext/adodb/adodb/adodb-xmlschema.inc.php:1308:        #set_magic_quotes_runtime(0);
typo3/sysext/adodb/adodb/adodb-xmlschema.inc.php:2198:        #set_magic_quotes_runtime( $this->mgq );
typo3/sysext/adodb/adodb/adodb-xmlschema03.inc.php:1411:        #set_magic_quotes_runtime(0);
typo3/sysext/adodb/adodb/adodb-xmlschema03.inc.php:2379:        #set_magic_quotes_runtime( $this->mgq );
typo3/contrib/swiftmailer/classes/Swift/KeyCache/DiskKeyCache.php:174:        set_magic_quotes_runtime(0);
typo3/contrib/swiftmailer/classes/Swift/KeyCache/DiskKeyCache.php:183:        set_magic_quotes_runtime(1);
typo3/contrib/swiftmailer/classes/Swift/KeyCache/DiskKeyCache.php:202:        set_magic_quotes_runtime(0);
typo3/contrib/swiftmailer/classes/Swift/KeyCache/DiskKeyCache.php:210:        set_magic_quotes_runtime(1);
typo3/contrib/swiftmailer/classes/Swift/ByteStream/FileByteStream.php:82:        set_magic_quotes_runtime(0);
typo3/contrib/swiftmailer/classes/Swift/ByteStream/FileByteStream.php:87:        set_magic_quotes_runtime(1);

checking for 'split()'

t3lib/class.t3lib_recordlist.php:313:        var checkBoxes = listOfCBnames.split(",");
typo3/sysext/cms/tslib/class.tslib_search.php:47: *  226:     function split($origSword, $specchars='+-', $delchars='+.,-')
typo3/sysext/cms/tslib/class.tslib_search.php:196:            $components = $this->split($sword);
typo3/sysext/cms/tslib/class.tslib_search.php:225:    function split($origSword, $specchars='+-', $delchars='+.,-')    {
typo3/sysext/taskcenter/task/index.php:482:        var version = parseFloat(navigator.appVersion.split(";")[1].strip().split(" ")[1]);
typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php:569:                    var additionalAttributes = plugin.pageTSConfiguration.additionalAttributes.split(",");
typo3/template.php:1983:                var version = parseFloat(navigator.appVersion.split(\';\')[1].strip().split(\' \')[1]);

checking for 'magic_quotes_runtime()'

typo3/sysext/adodb/adodb/adodb-xmlschema.inc.php:1307:        ini_set("magic_quotes_runtime", 0);
typo3/sysext/adodb/adodb/adodb-xmlschema.inc.php:2197:        ini_set("magic_quotes_runtime", $this->mgq );
typo3/sysext/adodb/adodb/adodb-xmlschema03.inc.php:1412:        ini_set("magic_quotes_runtime", 0);
typo3/sysext/adodb/adodb/adodb-xmlschema03.inc.php:2378:        ini_set("magic_quotes_runtime", $this->mgq );

Actions #1

Updated by Gerrit Code Review over 12 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11125

Actions #2

Updated by Wouter Wolters over 12 years ago

Can be abandoned.

Markus Klein May 10

Sorry Tomatia, but your replacements are completely wrong. Please read the PHP manual about the functions.

A simple replacement is not possible, as dynamic extension loading is not available anymore. Consider removing the whole (rather dirty) extension loading in xmlabstractparser completely.

class.tx_em_parser_xmlabstractparser.php is the only non-third-party file here, hence please do not touch the others.

Actions #3

Updated by Ernesto Baschny over 12 years ago

  • Status changed from Under Review to Rejected
  • Priority changed from Should have to Won't have this time
Actions #4

Updated by Sybille Peters almost 11 years ago

Why has this been rejected? Why "Can be abandoned."? Because the concerned code is not used or does not cause a problem or because the submitted patch is wrong?

Release Notes for PHP 5.4:

"Magic quotes has been removed. Applications relying on this feature may need to be updated, to avoid security issues. get_magic_quotes_gpc() and get_magic_quotes_runtime() now always return FALSE. set_magic_quotes_runtime() raises an E_CORE_ERROR level error on trying to enable Magic quotes."

etc.

http://www.php.net/manual/de/migration54.incompatible.php

If the concerned code is not used anyway, maybe remove it. If it is used, maybe someone should look at it.

Have not checked all functions (see above) but get_magic_quotes_runtime is still used in 4.5.32. Also in 6.1.7.

----------------------
grep r get_magic_quotes_runtime typo3_src-4.5.32/
typo3_src-4.5.32/typo3/sysext/adodb/adodb/adodb-xmlschema.inc.php: $this
>mgq = get_magic_quotes_runtime();
typo3_src-4.5.32/typo3/sysext/adodb/adodb/adodb.inc.php: if (get_magic_quotes_runtime() && !$this->memCache) {
typo3_src-4.5.32/typo3/sysext/adodb/adodb/adodb-csvlib.inc.php: if (get_magic_quotes_runtime()) $err .= ". Magic Quotes Runtime should be disabled!";
typo3_src-4.5.32/typo3/sysext/adodb/adodb/adodb-xmlschema03.inc.php: $this->mgq = get_magic_quotes_runtime();
typo3_src-4.5.32/typo3/contrib/swiftmailer/classes/Swift/KeyCache/DiskKeyCache.php: $this->_quotes = get_magic_quotes_runtime();
typo3_src-4.5.32/typo3/contrib/swiftmailer/classes/Swift/ByteStream/FileByteStream.php: $this->_quotes = get_magic_quotes_runtime();
----------------------
grep r get_magic_quotes_runtime typo3_src-6.1.7
typo3_src-6.1.7/typo3/sysext/adodb/adodb/adodb-xmlschema.inc.php: $this
>mgq = get_magic_quotes_runtime();
typo3_src-6.1.7/typo3/sysext/adodb/adodb/adodb.inc.php: if (get_magic_quotes_runtime() && !$this->memCache) {
typo3_src-6.1.7/typo3/sysext/adodb/adodb/adodb-csvlib.inc.php: if (get_magic_quotes_runtime()) $err .= ". Magic Quotes Runtime should be disabled!";
typo3_src-6.1.7/typo3/sysext/adodb/adodb/adodb-xmlschema03.inc.php: $this->mgq = get_magic_quotes_runtime();
typo3_src-6.1.7/typo3/contrib/swiftmailer/classes/Swift/KeyCache/DiskKeyCache.php: if (function_exists('get_magic_quotes_runtime') && @get_magic_quotes_runtime() 1) {
typo3_src-6.1.7/typo3/contrib/swiftmailer/classes/Swift/ByteStream/FileByteStream.php: if (function_exists('get_magic_quotes_runtime') && @get_magic_quotes_runtime() 1) {
typo3_src-6.1.7/typo3/contrib/codemirror/contrib/php/js/tokenizephp.js: "set_magic_quotes_runtime", "get_magic_quotes_gpc", "get_magic_quotes_runtime",
typo3_src-6.1.7/typo3/contrib/pear/HTTP/Request2.php: if ($magicQuotes = get_magic_quotes_runtime()) {
-------------------------
grep r set_magic_quotes_runtime typo3_src-4.5.32/
typo3_src-4.5.32/typo3/sysext/adodb/adodb/adodb-xmlschema.inc.php: #set_magic_quotes_runtime(0);
typo3_src-4.5.32/typo3/sysext/adodb/adodb/adodb-xmlschema.inc.php: #set_magic_quotes_runtime( $this
>mgq );
typo3_src-4.5.32/typo3/sysext/adodb/adodb/adodb-xmlschema03.inc.php: #set_magic_quotes_runtime(0);
typo3_src-4.5.32/typo3/sysext/adodb/adodb/adodb-xmlschema03.inc.php: #set_magic_quotes_runtime( $this->mgq );
typo3_src-4.5.32/typo3/contrib/swiftmailer/classes/Swift/KeyCache/DiskKeyCache.php: set_magic_quotes_runtime(0);
typo3_src-4.5.32/typo3/contrib/swiftmailer/classes/Swift/KeyCache/DiskKeyCache.php: set_magic_quotes_runtime(1);
typo3_src-4.5.32/typo3/contrib/swiftmailer/classes/Swift/KeyCache/DiskKeyCache.php: set_magic_quotes_runtime(0);
typo3_src-4.5.32/typo3/contrib/swiftmailer/classes/Swift/KeyCache/DiskKeyCache.php: set_magic_quotes_runtime(1);
typo3_src-4.5.32/typo3/contrib/swiftmailer/classes/Swift/ByteStream/FileByteStream.php: set_magic_quotes_runtime(0);
typo3_src-4.5.32/typo3/contrib/swiftmailer/classes/Swift/ByteStream/FileByteStream.php: set_magic_quotes_runtime(1);

Actions

Also available in: Atom PDF