From eb24eb1b5177c0e0db97ad9a862806e650abf8b9 Mon Sep 17 00:00:00 2001 From: Leonix Date: Tue, 21 Nov 2023 11:58:33 +0300 Subject: [PATCH] =?UTF-8?q?Webasyst=20Framework=20v.2.9.7=20=20=20*=20Impr?= =?UTF-8?q?oved=20apps=E2=80=99=20API.=20=20=20*=20Fixed=20a=20few=20found?= =?UTF-8?q?=20bugs.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wa-apps/installer/lib/config/app.php | 4 ++-- wa-content/css/wa/wa-2.0.css | 1 + wa-system/currency/waCurrency.class.php | 2 +- wa-system/mail/waMail.class.php | 4 ++-- wa-system/request/waRequest.class.php | 3 +++ wa-system/vendors/swift/classes/Swift/Attachment.php | 2 +- wa-system/vendors/swift/classes/Swift/SmtpTransport.php | 2 +- wa-system/webasyst/lib/config/app.php | 4 ++-- 8 files changed, 13 insertions(+), 9 deletions(-) diff --git a/wa-apps/installer/lib/config/app.php b/wa-apps/installer/lib/config/app.php index 8b4dfdf0a..86a2fa385 100644 --- a/wa-apps/installer/lib/config/app.php +++ b/wa-apps/installer/lib/config/app.php @@ -4,8 +4,8 @@ 'description' => 'Install new apps from the Webasyst Store', 'icon' => 'img/installer.svg', 'mobile' => false, - 'version' => '2.9.6', - 'critical' => '2.9.6', + 'version' => '2.9.7', + 'critical' => '2.9.7', 'system' => true, 'vendor' => 'webasyst', 'csrf' => true, diff --git a/wa-content/css/wa/wa-2.0.css b/wa-content/css/wa/wa-2.0.css index 51488a51a..1759e0624 100644 --- a/wa-content/css/wa/wa-2.0.css +++ b/wa-content/css/wa/wa-2.0.css @@ -2898,3 +2898,4 @@ progress.color-dark-gray::-moz-progress-bar { background-color: var(--dark-gray) } .hidden { display: none !important; } +table.xdebug-error th { color: black; } \ No newline at end of file diff --git a/wa-system/currency/waCurrency.class.php b/wa-system/currency/waCurrency.class.php index ff2e156bd..169e163e3 100644 --- a/wa-system/currency/waCurrency.class.php +++ b/wa-system/currency/waCurrency.class.php @@ -228,7 +228,7 @@ protected static function extract($n, $currency, $locale, $precision, $format, $ $n = round($n, $precision + 2); $n = floor($n * pow(10, $precision)) / ((float) pow(10, $precision)); } else { - $n = round($n, $precision); + $n = round((float) $n, $precision); // required to show '%.1' correctly for 0.99 if ($trim_to_width !== false && strlen($n) > $trim_to_width) { diff --git a/wa-system/mail/waMail.class.php b/wa-system/mail/waMail.class.php index 44291d4b6..2a0c403a0 100644 --- a/wa-system/mail/waMail.class.php +++ b/wa-system/mail/waMail.class.php @@ -33,7 +33,7 @@ public function send(Swift_Mime_Message $message, &$failedRecipients = null) if (!$message->getHeaders()->get('DKIM-Signature')) { $mail_config = $this->readConfigFile(); $sender_email = key($message->getFrom()); - $e = explode('@', ifset($sender_email)); + $e = explode('@', (string) ifset($sender_email)); $domain_name = end($e); $mail_data = false; @@ -106,7 +106,7 @@ public function send(Swift_Mime_Message $message, &$failedRecipients = null) */ public static function getTransportByEmail($email) { - $email = waIdna::dec(mb_strtolower($email)); + $email = waIdna::dec(mb_strtolower((string) $email)); if (!isset(self::$wa_config['transport'])) { self::$wa_config['transport'] = wa()->getConfig()->getConfigFile('mail'); } diff --git a/wa-system/request/waRequest.class.php b/wa-system/request/waRequest.class.php index cf12d1300..74ce1ba0e 100644 --- a/wa-system/request/waRequest.class.php +++ b/wa-system/request/waRequest.class.php @@ -306,6 +306,9 @@ public static function server($name = null, $default = null, $type = null) { if ($name && !isset($_SERVER[$name])) { $name = strtoupper($name); + if (!isset($_SERVER[$name])) { + $name = 'REDIRECT_'.$name; + } } return self::getData($_SERVER, $name, $default, $type); } diff --git a/wa-system/vendors/swift/classes/Swift/Attachment.php b/wa-system/vendors/swift/classes/Swift/Attachment.php index 7fdbcb999..c32d9b9bb 100644 --- a/wa-system/vendors/swift/classes/Swift/Attachment.php +++ b/wa-system/vendors/swift/classes/Swift/Attachment.php @@ -29,7 +29,7 @@ class Swift_Attachment extends Swift_Mime_Attachment public function __construct($data = null, $filename = null, $contentType = null) { call_user_func_array( - array($this, 'Swift_Mime_Attachment::__construct'), + array('Swift_Mime_Attachment', '__construct'), Swift_DependencyContainer::getInstance() ->createDependenciesFor('mime.attachment') ); diff --git a/wa-system/vendors/swift/classes/Swift/SmtpTransport.php b/wa-system/vendors/swift/classes/Swift/SmtpTransport.php index b369f0451..e3c064a5e 100644 --- a/wa-system/vendors/swift/classes/Swift/SmtpTransport.php +++ b/wa-system/vendors/swift/classes/Swift/SmtpTransport.php @@ -33,7 +33,7 @@ class Swift_SmtpTransport extends Swift_Transport_EsmtpTransport public function __construct($host = 'localhost', $port = 25, $security = null) { call_user_func_array( - array($this, 'Swift_Transport_EsmtpTransport::__construct'), + array('Swift_Transport_EsmtpTransport', '__construct'), Swift_DependencyContainer::getInstance() ->createDependenciesFor('transport.smtp') ); diff --git a/wa-system/webasyst/lib/config/app.php b/wa-system/webasyst/lib/config/app.php index 11ad7fbc7..e032ae82c 100644 --- a/wa-system/webasyst/lib/config/app.php +++ b/wa-system/webasyst/lib/config/app.php @@ -3,8 +3,8 @@ return array( 'name' => 'Webasyst', 'prefix' => 'webasyst', - 'version' => '2.9.6', - 'critical' => '2.9.6', + 'version' => '2.9.7', + 'critical' => '2.9.7', 'vendor' => 'webasyst', 'csrf' => true, 'header_items' => array(