Skip to content

Commit 34bac57

Browse files
committed
Release version 1.1.31
1 parent 386e1d9 commit 34bac57

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

CHANGELOG

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Yii Framework Change Log
22
========================
33

4-
Version 1.1.31 under development
4+
Version 1.1.31 April 10, 2025
55
--------------------------------
66

77
- Bug #4579: Fix Czech translation for "not equal to" validation message in CCompareValidator (karelvasicek)

framework/YiiBase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class YiiBase
8787
*/
8888
public static function getVersion()
8989
{
90-
return '1.1.31-dev';
90+
return '1.1.31';
9191
}
9292

9393
/**

framework/yiilite.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class YiiBase
4141
private static $_logger;
4242
public static function getVersion()
4343
{
44-
return '1.1.31-dev';
44+
return '1.1.31';
4545
}
4646
public static function createWebApplication($config=null)
4747
{
@@ -1607,7 +1607,7 @@ public function displayError($code,$message,$file,$line)
16071607
if(YII_DEBUG)
16081608
{
16091609
echo "<h1>PHP Error [$code]</h1>\n";
1610-
echo "<p>$message ($file:$line)</p>\n";
1610+
echo "<p>".nl2br($this->htmlEncodeInternal($message))." (".$this->htmlEncodeInternal($file).":$line)</p>\n";
16111611
echo '<pre>';
16121612
$trace=debug_backtrace();
16131613
// skip the first 2 stacks as they are always irrelevant
@@ -1631,23 +1631,27 @@ public function displayError($code,$message,$file,$line)
16311631
else
16321632
{
16331633
echo "<h1>PHP Error [$code]</h1>\n";
1634-
echo "<p>$message</p>\n";
1634+
echo "<p>".nl2br($this->htmlEncodeInternal($message))."</p>\n";
16351635
}
16361636
}
16371637
public function displayException($exception)
16381638
{
16391639
if(YII_DEBUG)
16401640
{
16411641
echo '<h1>'.get_class($exception)."</h1>\n";
1642-
echo '<p>'.$exception->getMessage().' ('.$exception->getFile().':'.$exception->getLine().')</p>';
1643-
echo '<pre>'.$exception->getTraceAsString().'</pre>';
1642+
echo '<p>'.nl2br($this->htmlEncodeInternal($exception->getMessage())).' ('.$this->htmlEncodeInternal($exception->getFile()).':'.$exception->getLine().')</p>';
1643+
echo '<pre>'.$this->htmlEncodeInternal($exception->getTraceAsString()).'</pre>';
16441644
}
16451645
else
16461646
{
16471647
echo '<h1>'.get_class($exception)."</h1>\n";
1648-
echo '<p>'.$exception->getMessage().'</p>';
1648+
echo '<p>'.nl2br($this->htmlEncodeInternal($exception->getMessage())).'</p>';
16491649
}
16501650
}
1651+
private function htmlEncodeInternal($string)
1652+
{
1653+
return htmlspecialchars($string, ENT_NOQUOTES | ENT_SUBSTITUTE | ENT_HTML5, 'UTF-8');
1654+
}
16511655
protected function initSystemHandlers()
16521656
{
16531657
if(YII_ENABLE_EXCEPTION_HANDLER)

0 commit comments

Comments
 (0)