diff --git a/README b/README index cc18a69444..0eaa907cb8 100644 --- a/README +++ b/README @@ -42,7 +42,7 @@ along with this program. If not, see . Requirements ------------ -* PHP 5.2 or later +* PHP 5.3 or later * MySQL 5.0 or later * a web-browser (doh!) diff --git a/composer.json b/composer.json index ba03706ef4..2217942cfb 100644 --- a/composer.json +++ b/composer.json @@ -19,6 +19,6 @@ "source": "https://github.com/phpmyadmin/phpmyadmin" }, "require": { - "php": ">=5.2.0" + "php": ">=5.3.0" } } diff --git a/doc/faq.rst b/doc/faq.rst index 4194d6ef93..4c77f71b87 100644 --- a/doc/faq.rst +++ b/doc/faq.rst @@ -395,8 +395,8 @@ MMCache but upgrading MMCache to version 2.3.21 solves the problem. Yes. -Since release 3.0 only PHP 5.2 and newer. For older PHP versions, use -phpMyAdmin 2.11.x. +Since release 4.1 phpMyAdmin supports only PHP 5.3 and newer. For PHP 5.2 you +can use 4.0.x releases. .. _faq1_32: diff --git a/doc/require.rst b/doc/require.rst index 1452ee34ff..e45e8fef8c 100644 --- a/doc/require.rst +++ b/doc/require.rst @@ -12,7 +12,7 @@ web server (such as Apache, :term:`IIS`) to install phpMyAdmin's files into. PHP --- -* You need PHP 5.2.0 or newer, with ``session`` support, the Standard PHP Library +* You need PHP 5.3.0 or newer, with ``session`` support, the Standard PHP Library (SPL) extension and JSON support. * To support uploading of ZIP files, you need the PHP ``zip`` extension. @@ -31,7 +31,7 @@ PHP * To support upload progress bars, see :ref:`faq2_9`. * To support XML and Open Document Spreadsheet importing, you need PHP - 5.2.17 or newer and the `libxml `_ + with the `libxml `_ extension. .. seealso:: :ref:`faq1_31`, :ref:`authentication_modes` diff --git a/libraries/File.class.php b/libraries/File.class.php index 0f6aae1804..812e808e00 100644 --- a/libraries/File.class.php +++ b/libraries/File.class.php @@ -531,7 +531,7 @@ class PMA_File * get registered plugins for file compression foreach (PMA_getPlugins($type = 'compression') as $plugin) { - if (call_user_func_array(array($plugin['classname'], 'canHandle'), array($this->getName()))) { + if ($plugin['classname']::canHandle($this->getName())) { $this->setCompressionPlugin($plugin); break; } diff --git a/libraries/Message.class.php b/libraries/Message.class.php index 1f93ad2de4..f1b16dfbca 100644 --- a/libraries/Message.class.php +++ b/libraries/Message.class.php @@ -723,12 +723,12 @@ class PMA_Message return $this->isDisplayed; } - + /** * Returns the message with corresponding image icon - * + * * @param string $message the message(s) - * + * * @return string message with icon */ public function getMessageWithIcon($message) @@ -743,7 +743,7 @@ class PMA_Message } $message = PMA_Message::notice(PMA_Util::getImage($image)) . " " . $message; return $message; - + } } ?> diff --git a/libraries/OutputBuffering.class.php b/libraries/OutputBuffering.class.php index 9923577ad3..50a3d1d842 100644 --- a/libraries/OutputBuffering.class.php +++ b/libraries/OutputBuffering.class.php @@ -135,12 +135,9 @@ class PMA_OutputBuffering { if (ob_get_status() && $this->_mode) { ob_flush(); + } else { + flush(); } - /** - * previously we had here an "else flush()" but some PHP versions - * (at least PHP 5.2.11) have a bug (49816) that produces garbled - * data - */ } } diff --git a/libraries/common.inc.php b/libraries/common.inc.php index 78fc012810..7855417285 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -35,15 +35,8 @@ * Minimum PHP version; can't call PMA_fatalError() which uses a * PHP 5 function, so cannot easily localize this message. */ -if (version_compare(PHP_VERSION, '5.2.0', 'lt')) { - die('PHP 5.2+ is required'); -} - -/** - * Backward compatibility for PHP 5.2 - */ -if (!defined('E_DEPRECATED')) { - define('E_DEPRECATED', 8192); +if (version_compare(PHP_VERSION, '5.3.0', 'lt')) { + die('PHP 5.3+ is required'); } /** @@ -57,17 +50,6 @@ require './libraries/Error_Handler.class.php'; $GLOBALS['error_handler'] = new PMA_Error_Handler(); $cfg['Error_Handler']['display'] = true; -/* - * This setting was removed in PHP 5.3. But at this point PMA_PHP_INT_VERSION - * is not yet defined so we use another way to find out the PHP version. - */ -if (version_compare(phpversion(), '5.3', 'lt')) { - /** - * Avoid object cloning errors - */ - @ini_set('zend.ze1_compatibility_mode', false); -} - /** * This setting was removed in PHP 5.4. But at this point PMA_PHP_INT_VERSION * is not yet defined so we use another way to find out the PHP version. diff --git a/libraries/dbi/DBIMysqli.class.php b/libraries/dbi/DBIMysqli.class.php index 0f1c126cf7..3f7a5d756b 100644 --- a/libraries/dbi/DBIMysqli.class.php +++ b/libraries/dbi/DBIMysqli.class.php @@ -86,12 +86,11 @@ class PMA_DBI_Mysqli implements PMA_DBI_Extension ) { global $cfg; - // mysqli persistent connections only on PHP 5.3+ - if (PMA_PHP_INT_VERSION >= 50300) { - if ($cfg['PersistentConnections'] || $persistent) { - $host = 'p:' . $host; - } + // mysqli persistent connections + if ($cfg['PersistentConnections'] || $persistent) { + $host = 'p:' . $host; } + if ($client_flags === null) { return @mysqli_real_connect( $link, @@ -691,10 +690,6 @@ class PMA_DBI_Mysqli implements PMA_DBI_Extension */ public function fieldFlags($result, $i) { - // This is missing from PHP 5.2.5, see http://bugs.php.net/bug.php?id=44846 - if (! defined('MYSQLI_ENUM_FLAG')) { - define('MYSQLI_ENUM_FLAG', 256); // see MySQL source include/mysql_com.h - } $f = mysqli_fetch_field_direct($result, $i); $type = $f->type; $charsetnr = $f->charsetnr; @@ -758,4 +753,4 @@ class PMA_DBI_Mysqli implements PMA_DBI_Extension return trim($flags); } } -?> \ No newline at end of file +?> diff --git a/libraries/display_import.lib.php b/libraries/display_import.lib.php index 650dda6d21..252d2f6637 100644 --- a/libraries/display_import.lib.php +++ b/libraries/display_import.lib.php @@ -168,7 +168,7 @@ if ($_SESSION[$SESSION_KEY]["handler"] != "UploadNoplugin") { echo ' class="ajax"'; ?>> diff --git a/libraries/file_listing.lib.php b/libraries/file_listing.lib.php index e5b680c2ca..fbeed49763 100644 --- a/libraries/file_listing.lib.php +++ b/libraries/file_listing.lib.php @@ -25,11 +25,7 @@ function PMA_getDirContent($dir, $expression = '') $dir .= '/'; } while ($file = @readdir($handle)) { - // for PHP < 5.2.4, is_file() gives a warning when using open_basedir - // and verifying '..' or '.' - if ('.' != $file - && '..' != $file - && is_file($dir . $file) + if (is_file($dir . $file) && ($expression == '' || preg_match($expression, $file)) ) { $result[] = $file; diff --git a/libraries/plugins/PluginObserver.class.php b/libraries/plugins/PluginObserver.class.php index 520d62a4d3..83251f1465 100644 --- a/libraries/plugins/PluginObserver.class.php +++ b/libraries/plugins/PluginObserver.class.php @@ -43,21 +43,12 @@ abstract class PluginObserver implements SplObserver * This method is called when any PluginManager to which the observer * is attached calls PluginManager::notify() * - * TODO Declare this function abstract, removing its body, - * as soon as we drop support for PHP 5.2.x. - * See bug #3538655. - * * @param SplSubject $subject The PluginManager notifying the observer * of an update. * * @return void */ - public function update (SplSubject $subject) - { - throw new Exception( - 'PluginObserver::update must be overridden in child classes.' - ); - } + public abstract function update (SplSubject $subject); /* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */ diff --git a/libraries/plugins/transformations/Application_Octetstream_Download.class.php b/libraries/plugins/transformations/Application_Octetstream_Download.class.php index 46bda70452..069eda719b 100644 --- a/libraries/plugins/transformations/Application_Octetstream_Download.class.php +++ b/libraries/plugins/transformations/Application_Octetstream_Download.class.php @@ -40,25 +40,4 @@ class Application_Octetstream_Download extends DownloadTransformationsPlugin return "OctetStream"; } } - -/** - * Function to call Application_Octetstream_Download::getInfo(); - * - * Temporary workaround for bug #3783 : - * Calling a method from a variable class is not possible before PHP 5.3. - * - * This function is called by PMA_getTransformationDescription() - * in libraries/transformations.lib.php using a variable to construct it's name. - * This function then calls the static method. - * - * Don't use this function unless you are affected by the same issue. - * Call the static method directly instead. - * - * @deprecated - * @return string Info about transformation class - */ -function Application_Octetstream_Download_getInfo() -{ - return Application_Octetstream_Download::getInfo(); -} -?> +?> \ No newline at end of file diff --git a/libraries/plugins/transformations/Application_Octetstream_Hex.class.php b/libraries/plugins/transformations/Application_Octetstream_Hex.class.php index f876abbe30..f6f4297460 100644 --- a/libraries/plugins/transformations/Application_Octetstream_Hex.class.php +++ b/libraries/plugins/transformations/Application_Octetstream_Hex.class.php @@ -41,25 +41,4 @@ class Application_Octetstream_Hex extends HexTransformationsPlugin return "OctetStream"; } } - -/** - * Function to call Application_Octetstream_Hex::getInfo(); - * - * Temporary workaround for bug #3783 : - * Calling a method from a variable class is not possible before PHP 5.3. - * - * This function is called by PMA_getTransformationDescription() - * in libraries/transformations.lib.php using a variable to construct it's name. - * This function then calls the static method. - * - * Don't use this function unless you are affected by the same issue. - * Call the static method directly instead. - * - * @deprecated - * @return string Info about transformation class - */ -function Application_Octetstream_Hex_getInfo() -{ - return Application_Octetstream_Hex::getInfo(); -} -?> +?> \ No newline at end of file diff --git a/libraries/plugins/transformations/Image_JPEG_Inline.class.php b/libraries/plugins/transformations/Image_JPEG_Inline.class.php index 934df75ea8..501205a945 100644 --- a/libraries/plugins/transformations/Image_JPEG_Inline.class.php +++ b/libraries/plugins/transformations/Image_JPEG_Inline.class.php @@ -41,25 +41,4 @@ class Image_JPEG_Inline extends InlineTransformationsPlugin return "JPEG"; } } - -/** - * Function to call Image_JPEG_Inline::getInfo(); - * - * Temporary workaround for bug #3783 : - * Calling a method from a variable class is not possible before PHP 5.3. - * - * This function is called by PMA_getTransformationDescription() - * in libraries/transformations.lib.php using a variable to construct it's name. - * This function then calls the static method. - * - * Don't use this function unless you are affected by the same issue. - * Call the static method directly instead. - * - * @deprecated - * @return string Info about transformation class - */ -function Image_JPEG_Inline_getInfo() -{ - return Image_JPEG_Inline::getInfo(); -} -?> +?> \ No newline at end of file diff --git a/libraries/plugins/transformations/Image_JPEG_Link.class.php b/libraries/plugins/transformations/Image_JPEG_Link.class.php index fc04040f22..ca3c1d18ea 100644 --- a/libraries/plugins/transformations/Image_JPEG_Link.class.php +++ b/libraries/plugins/transformations/Image_JPEG_Link.class.php @@ -41,25 +41,4 @@ class Image_JPEG_Link extends ImageLinkTransformationsPlugin return "JPEG"; } } - -/** - * Function to call Image_JPEG_Link::getInfo(); - * - * Temporary workaround for bug #3783 : - * Calling a method from a variable class is not possible before PHP 5.3. - * - * This function is called by PMA_getTransformationDescription() - * in libraries/transformations.lib.php using a variable to construct it's name. - * This function then calls the static method. - * - * Don't use this function unless you are affected by the same issue. - * Call the static method directly instead. - * - * @deprecated - * @return string Info about transformation class - */ -function Image_JPEG_Link_getInfo() -{ - return Image_JPEG_Link::getInfo(); -} -?> +?> \ No newline at end of file diff --git a/libraries/plugins/transformations/Image_PNG_Inline.class.php b/libraries/plugins/transformations/Image_PNG_Inline.class.php index e879c2374a..40b709d87a 100644 --- a/libraries/plugins/transformations/Image_PNG_Inline.class.php +++ b/libraries/plugins/transformations/Image_PNG_Inline.class.php @@ -41,25 +41,4 @@ class Image_PNG_Inline extends InlineTransformationsPlugin return "PNG"; } } - -/** - * Function to call Image_PNG_Inline::getInfo(); - * - * Temporary workaround for bug #3783 : - * Calling a method from a variable class is not possible before PHP 5.3. - * - * This function is called by PMA_getTransformationDescription() - * in libraries/transformations.lib.php using a variable to construct it's name. - * This function then calls the static method. - * - * Don't use this function unless you are affected by the same issue. - * Call the static method directly instead. - * - * @deprecated - * @return string Info about transformation class - */ -function Image_PNG_Inline_getInfo() -{ - return Image_PNG_Inline::getInfo(); -} -?> +?> \ No newline at end of file diff --git a/libraries/plugins/transformations/TEMPLATE b/libraries/plugins/transformations/TEMPLATE index b0ce2f0459..6f116ce833 100644 --- a/libraries/plugins/transformations/TEMPLATE +++ b/libraries/plugins/transformations/TEMPLATE @@ -43,26 +43,4 @@ class [MIMEType]_[MIMESubtype]_[TransformationName] return "[MIMESubtype]"; } } - -/** - * Function to call [MIMEType]_[MIMESubtype]_[TransformationName]::getInfo(); - * - * Temporary workaround for bug #3783 : - * Calling a method from a variable class is not possible before PHP 5.3. - * - * This function is called by PMA_getTransformationDescription() - * in libraries/transformations.lib.php using a variable to construct it's name. - * This function then calls the static method. - * - * Don't use this function unless you are affected by the same issue. - * Call the static method directly instead. - * - * @deprecated - * @return string Info about transformation class - */ - -function [MIMEType]_[MIMESubtype]_[TransformationName]_getInfo() -{ - return [MIMEType]_[MIMESubtype]_[TransformationName]::getInfo(); -} ?> diff --git a/libraries/plugins/transformations/Text_Plain_Append.class.php b/libraries/plugins/transformations/Text_Plain_Append.class.php index 8a102cbfdb..567c2cc608 100644 --- a/libraries/plugins/transformations/Text_Plain_Append.class.php +++ b/libraries/plugins/transformations/Text_Plain_Append.class.php @@ -42,25 +42,4 @@ class Text_Plain_Append extends AppendTransformationsPlugin return "Plain"; } } - -/** - * Function to call Text_Plain_Append::getInfo(); - * - * Temporary workaround for bug #3783 : - * Calling a method from a variable class is not possible before PHP 5.3. - * - * This function is called by PMA_getTransformationDescription() - * in libraries/transformations.lib.php using a variable to construct it's name. - * This function then calls the static method. - * - * Don't use this function unless you are affected by the same issue. - * Call the static method directly instead. - * - * @deprecated - * @return string Info about transformation class - */ -function Text_Plain_Append_getInfo() -{ - return Text_Plain_Append::getInfo(); -} -?> +?> \ No newline at end of file diff --git a/libraries/plugins/transformations/Text_Plain_Dateformat.class.php b/libraries/plugins/transformations/Text_Plain_Dateformat.class.php index ed8c9e561d..70db98aef7 100644 --- a/libraries/plugins/transformations/Text_Plain_Dateformat.class.php +++ b/libraries/plugins/transformations/Text_Plain_Dateformat.class.php @@ -41,25 +41,4 @@ class Text_Plain_Dateformat extends DateFormatTransformationsPlugin return "Plain"; } } - -/** - * Function to call Text_Plain_Dateformat::getInfo(); - * - * Temporary workaround for bug #3783 : - * Calling a method from a variable class is not possible before PHP 5.3. - * - * This function is called by PMA_getTransformationDescription() - * in libraries/transformations.lib.php using a variable to construct it's name. - * This function then calls the static method. - * - * Don't use this function unless you are affected by the same issue. - * Call the static method directly instead. - * - * @deprecated - * @return string Info about transformation class - */ -function Text_Plain_Dateformat_getInfo() -{ - return Text_Plain_Dateformat::getInfo(); -} -?> +?> \ No newline at end of file diff --git a/libraries/plugins/transformations/Text_Plain_External.class.php b/libraries/plugins/transformations/Text_Plain_External.class.php index 1aa321a516..18da613183 100644 --- a/libraries/plugins/transformations/Text_Plain_External.class.php +++ b/libraries/plugins/transformations/Text_Plain_External.class.php @@ -41,25 +41,4 @@ class Text_Plain_External extends ExternalTransformationsPlugin return "Plain"; } } - -/** - * Function to call Text_Plain_External::getInfo(); - * - * Temporary workaround for bug #3783 : - * Calling a method from a variable class is not possible before PHP 5.3. - * - * This function is called by PMA_getTransformationDescription() - * in libraries/transformations.lib.php using a variable to construct it's name. - * This function then calls the static method. - * - * Don't use this function unless you are affected by the same issue. - * Call the static method directly instead. - * - * @deprecated - * @return string Info about transformation class - */ -function Text_Plain_External_getInfo() -{ - return Text_Plain_External::getInfo(); -} -?> +?> \ No newline at end of file diff --git a/libraries/plugins/transformations/Text_Plain_Formatted.class.php b/libraries/plugins/transformations/Text_Plain_Formatted.class.php index 5c6b683e7c..3942a93e32 100644 --- a/libraries/plugins/transformations/Text_Plain_Formatted.class.php +++ b/libraries/plugins/transformations/Text_Plain_Formatted.class.php @@ -41,25 +41,4 @@ class Text_Plain_Formatted extends FormattedTransformationsPlugin return "Plain"; } } - -/** - * Function to call Text_Plain_Formatted::getInfo(); - * - * Temporary workaround for bug #3783 : - * Calling a method from a variable class is not possible before PHP 5.3. - * - * This function is called by PMA_getTransformationDescription() - * in libraries/transformations.lib.php using a variable to construct it's name. - * This function then calls the static method. - * - * Don't use this function unless you are affected by the same issue. - * Call the static method directly instead. - * - * @deprecated - * @return string Info about transformation class - */ -function Text_Plain_Formatted_getInfo() -{ - return Text_Plain_Formatted::getInfo(); -} -?> +?> \ No newline at end of file diff --git a/libraries/plugins/transformations/Text_Plain_Imagelink.class.php b/libraries/plugins/transformations/Text_Plain_Imagelink.class.php index 4cb180072b..670e52e8d7 100644 --- a/libraries/plugins/transformations/Text_Plain_Imagelink.class.php +++ b/libraries/plugins/transformations/Text_Plain_Imagelink.class.php @@ -41,25 +41,4 @@ class Text_Plain_Imagelink extends TextImageLinkTransformationsPlugin return "Plain"; } } - -/** - * Function to call Text_Plain_Imagelink::getInfo(); - * - * Temporary workaround for bug #3783 : - * Calling a method from a variable class is not possible before PHP 5.3. - * - * This function is called by PMA_getTransformationDescription() - * in libraries/transformations.lib.php using a variable to construct it's name. - * This function then calls the static method. - * - * Don't use this function unless you are affected by the same issue. - * Call the static method directly instead. - * - * @deprecated - * @return string Info about transformation class - */ -function Text_Plain_Imagelink_getInfo() -{ - return Text_Plain_Imagelink::getInfo(); -} -?> +?> \ No newline at end of file diff --git a/libraries/plugins/transformations/Text_Plain_Link.class.php b/libraries/plugins/transformations/Text_Plain_Link.class.php index 1e642039b9..d1b17d5ec8 100644 --- a/libraries/plugins/transformations/Text_Plain_Link.class.php +++ b/libraries/plugins/transformations/Text_Plain_Link.class.php @@ -41,25 +41,4 @@ class Text_Plain_Link extends TextLinkTransformationsPlugin return "Plain"; } } - -/** - * Function to call Text_Plain_Link::getInfo(); - * - * Temporary workaround for bug #3783 : - * Calling a method from a variable class is not possible before PHP 5.3. - * - * This function is called by PMA_getTransformationDescription() - * in libraries/transformations.lib.php using a variable to construct it's name. - * This function then calls the static method. - * - * Don't use this function unless you are affected by the same issue. - * Call the static method directly instead. - * - * @deprecated - * @return string Info about transformation class - */ -function Text_Plain_Link_getInfo() -{ - return Text_Plain_Link::getInfo(); -} -?> +?> \ No newline at end of file diff --git a/libraries/plugins/transformations/Text_Plain_Longtoipv4.class.php b/libraries/plugins/transformations/Text_Plain_Longtoipv4.class.php index 44eea50702..9f58a45eb3 100644 --- a/libraries/plugins/transformations/Text_Plain_Longtoipv4.class.php +++ b/libraries/plugins/transformations/Text_Plain_Longtoipv4.class.php @@ -41,25 +41,4 @@ class Text_Plain_Longtoipv4 extends LongToIPv4TransformationsPlugin return "Plain"; } } - -/** - * Function to call Text_Plain_Longtoipv4::getInfo(); - * - * Temporary workaround for bug #3783 : - * Calling a method from a variable class is not possible before PHP 5.3. - * - * This function is called by PMA_getTransformationDescription() - * in libraries/transformations.lib.php using a variable to construct it's name. - * This function then calls the static method. - * - * Don't use this function unless you are affected by the same issue. - * Call the static method directly instead. - * - * @deprecated - * @return string Info about transformation class - */ -function Text_Plain_Longtoipv4_getInfo() -{ - return Text_Plain_Longtoipv4::getInfo(); -} -?> +?> \ No newline at end of file diff --git a/libraries/plugins/transformations/Text_Plain_Sql.class.php b/libraries/plugins/transformations/Text_Plain_Sql.class.php index cc9249142c..1987ba9144 100644 --- a/libraries/plugins/transformations/Text_Plain_Sql.class.php +++ b/libraries/plugins/transformations/Text_Plain_Sql.class.php @@ -41,25 +41,4 @@ class Text_Plain_Sql extends SQLTransformationsPlugin return "Plain"; } } - -/** - * Function to call Text_Plain_Sql::getInfo(); - * - * Temporary workaround for bug #3783 : - * Calling a method from a variable class is not possible before PHP 5.3. - * - * This function is called by PMA_getTransformationDescription() - * in libraries/transformations.lib.php using a variable to construct it's name. - * This function then calls the static method. - * - * Don't use this function unless you are affected by the same issue. - * Call the static method directly instead. - * - * @deprecated - * @return string Info about transformation class - */ -function Text_Plain_Sql_getInfo() -{ - return Text_Plain_Sql::getInfo(); -} -?> +?> \ No newline at end of file diff --git a/libraries/plugins/transformations/Text_Plain_Substring.class.php b/libraries/plugins/transformations/Text_Plain_Substring.class.php index b04231ff2b..051ae51cd3 100644 --- a/libraries/plugins/transformations/Text_Plain_Substring.class.php +++ b/libraries/plugins/transformations/Text_Plain_Substring.class.php @@ -41,25 +41,4 @@ class Text_Plain_Substring extends SubstringTransformationsPlugin return "Plain"; } } - -/** - * Function to call Text_Plain_Substring::getInfo(); - * - * Temporary workaround for bug #3783 : - * Calling a method from a variable class is not possible before PHP 5.3. - * - * This function is called by PMA_getTransformationDescription() - * in libraries/transformations.lib.php using a variable to construct it's name. - * This function then calls the static method. - * - * Don't use this function unless you are affected by the same issue. - * Call the static method directly instead. - * - * @deprecated - * @return string Info about transformation class - */ -function Text_Plain_Substring_getInfo() -{ - return Text_Plain_Substring::getInfo(); -} -?> +?> \ No newline at end of file diff --git a/libraries/properties/options/OptionsPropertyGroup.class.php b/libraries/properties/options/OptionsPropertyGroup.class.php index ebff9b321b..fe2fe40f65 100644 --- a/libraries/properties/options/OptionsPropertyGroup.class.php +++ b/libraries/properties/options/OptionsPropertyGroup.class.php @@ -59,11 +59,9 @@ abstract class OptionsPropertyGroup extends OptionsPropertyItem $this->_properties = array_udiff( $this->getProperties(), array($property), - // for PHP 5.2 compability - create_function( - '$a, $b', - 'return ($a === $b ) ? 0 : 1' - ) + function ($a, $b) { + return ($a === $b ) ? 0 : 1; + } ); } diff --git a/libraries/transformations.lib.php b/libraries/transformations.lib.php index 39a0ff09d6..2e5ded66da 100644 --- a/libraries/transformations.lib.php +++ b/libraries/transformations.lib.php @@ -147,10 +147,7 @@ function PMA_getTransformationDescription($file, $html_formatted = true) // include and instantiate the class include_once 'libraries/plugins/transformations/' . $file; - /* Temporary workaround for bug #3783 : - Calling a method from a variable class is not possible before PHP 5.3. */ - $functionGetInfo = $class_name . "_getInfo"; - return $functionGetInfo(); + return $class_name->getInfo(); } /** @@ -279,7 +276,7 @@ function PMA_setMIME($db, $table, $key, $mimetype, $transformation, WHERE `db_name` = \'' . PMA_Util::sqlAddSlashes($db) . '\' AND `table_name` = \'' . PMA_Util::sqlAddSlashes($table) . '\' AND `column_name` = \'' . PMA_Util::sqlAddSlashes($key) . '\''; - + $test_rs = PMA_queryAsControlUser( $test_qry, true, PMA_DatabaseInterface::QUERY_STORE ); @@ -391,24 +388,24 @@ function PMA_clearTransformations($db, $table = '', $column = '') . PMA_Util::backquote($cfgRelation['db']) . '.' . PMA_Util::backquote($cfgRelation['column_info']) . ' WHERE '; - + if (($column != '') && ($table != '')) { - + $delete_sql .= '`db_name` = \'' . $db . '\' AND ' . '`table_name` = \'' . $table . '\' AND ' . '`column_name` = \'' . $column . '\' '; - + } else if ($table != '') { - + $delete_sql .= '`db_name` = \'' . $db . '\' AND ' . '`table_name` = \'' . $table . '\' '; - + } else { $delete_sql .= '`db_name` = \'' . $db . '\' '; } - + return $GLOBALS['dbi']->tryQuery($delete_sql); - + } ?> diff --git a/test/Environment_test.php b/test/Environment_test.php index b354e8feb0..06cc43ece0 100644 --- a/test/Environment_test.php +++ b/test/Environment_test.php @@ -26,8 +26,8 @@ class Environment_Test extends PHPUnit_Framework_TestCase public function testPhpVersion() { $this->assertTrue( - version_compare('5.2', phpversion(), '<='), - 'phpMyAdmin requires PHP 5.2 or above' + version_compare('5.3', phpversion(), '<='), + 'phpMyAdmin requires PHP 5.3 or above' ); }