From 052e22c1a676f86548f0af9a7956706d042c462a Mon Sep 17 00:00:00 2001 From: Hugues Peccatte Date: Tue, 7 May 2019 22:59:13 +0200 Subject: [PATCH] Use magic variables when possible Signed-off-by: Hugues Peccatte --- libraries/classes/Controllers/HomeController.php | 2 +- libraries/classes/ErrorReport.php | 2 +- libraries/classes/Plugins/Export/ExportLatex.php | 2 +- libraries/classes/Plugins/Export/ExportSql.php | 2 +- libraries/classes/Plugins/Export/ExportXml.php | 2 +- libraries/classes/Plugins/Schema/Pdf/Pdf.php | 2 +- libraries/classes/Plugins/Schema/Pdf/PdfRelationSchema.php | 2 +- libraries/classes/Response.php | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libraries/classes/Controllers/HomeController.php b/libraries/classes/Controllers/HomeController.php index 33f28f273c..bb99a8e81a 100644 --- a/libraries/classes/Controllers/HomeController.php +++ b/libraries/classes/Controllers/HomeController.php @@ -191,7 +191,7 @@ class HomeController extends AbstractController $webServer['database'] = $clientVersion; $webServer['php_extensions'] = Util::listPHPExtensions(); - $webServer['php_version'] = phpversion(); + $webServer['php_version'] = PHP_VERSION; } } if ($cfg['ShowPhpInfo']) { diff --git a/libraries/classes/ErrorReport.php b/libraries/classes/ErrorReport.php index 759211eabb..6a32b5ee2c 100644 --- a/libraries/classes/ErrorReport.php +++ b/libraries/classes/ErrorReport.php @@ -99,7 +99,7 @@ class ErrorReport "locale" => $_COOKIE['pma_lang'], "configuration_storage" => is_null($relParams['db']) ? "disabled" : "enabled", - "php_version" => phpversion() + "php_version" => PHP_VERSION ]; if ($exceptionType == 'js') { diff --git a/libraries/classes/Plugins/Export/ExportLatex.php b/libraries/classes/Plugins/Export/ExportLatex.php index 9d796209f1..2f89784d5f 100644 --- a/libraries/classes/Plugins/Export/ExportLatex.php +++ b/libraries/classes/Plugins/Export/ExportLatex.php @@ -226,7 +226,7 @@ class ExportLatex extends ExportPlugin . '% ' . __('Generation Time:') . ' ' . Util::localisedDate() . $crlf . '% ' . __('Server version:') . ' ' . $GLOBALS['dbi']->getVersionString() . $crlf - . '% ' . __('PHP Version:') . ' ' . phpversion() . $crlf; + . '% ' . __('PHP Version:') . ' ' . PHP_VERSION . $crlf; return $this->export->outputHandler($head); } diff --git a/libraries/classes/Plugins/Export/ExportSql.php b/libraries/classes/Plugins/Export/ExportSql.php index ca2332f9d0..9597162efc 100644 --- a/libraries/classes/Plugins/Export/ExportSql.php +++ b/libraries/classes/Plugins/Export/ExportSql.php @@ -727,7 +727,7 @@ class ExportSql extends ExportPlugin . $this->_exportComment( __('Server version:') . ' ' . $GLOBALS['dbi']->getVersionString() ) - . $this->_exportComment(__('PHP Version:') . ' ' . phpversion()) + . $this->_exportComment(__('PHP Version:') . ' ' . PHP_VERSION) . $this->_possibleCRLF(); if (isset($GLOBALS['sql_header_comment']) diff --git a/libraries/classes/Plugins/Export/ExportXml.php b/libraries/classes/Plugins/Export/ExportXml.php index 44cd02da14..c433e2a7c0 100644 --- a/libraries/classes/Plugins/Export/ExportXml.php +++ b/libraries/classes/Plugins/Export/ExportXml.php @@ -249,7 +249,7 @@ class ExportXml extends ExportPlugin . '- ' . __('Generation Time:') . ' ' . Util::localisedDate() . $crlf . '- ' . __('Server version:') . ' ' . $GLOBALS['dbi']->getVersionString() . $crlf - . '- ' . __('PHP Version:') . ' ' . phpversion() . $crlf + . '- ' . __('PHP Version:') . ' ' . PHP_VERSION . $crlf . '-->' . $crlf . $crlf; $head .= 'header($header); } }