Browse Source

Upload 1.1.25

master v1.1.25
parent
commit
e1efa6f35e
  1. 11
      CHANGELOG
  2. 5
      UPGRADE
  3. 4
      framework/YiiBase.php
  4. 4
      framework/base/CComponent.php
  5. 4
      framework/cli/commands/shell/CrudCommand.php
  6. 4
      framework/cli/commands/shell/ModelCommand.php
  7. 0
      framework/db/schema/cubrid/CCubridColumnSchema.php
  8. 0
      framework/db/schema/cubrid/CCubridSchema.php
  9. 0
      framework/db/schema/cubrid/CCubridTableSchema.php
  10. 1
      framework/db/schema/mssql/CMssqlCommandBuilder.php
  11. 9
      framework/gii/components/Pear/Text/Diff/Engine/native.php
  12. 2
      framework/gii/generators/model/ModelCode.php
  13. 3
      framework/logging/CFileLogRoute.php
  14. 2
      framework/validators/CFilterValidator.php
  15. 0
      framework/views/ca/error.php
  16. 0
      framework/views/ca/error400.php
  17. 0
      framework/views/ca/error403.php
  18. 0
      framework/views/ca/error404.php
  19. 0
      framework/views/ca/error500.php
  20. 0
      framework/views/ca/error503.php
  21. 0
      framework/views/ca/log-firebug.php
  22. 0
      framework/views/ca/log.php
  23. 0
      framework/views/ca/profile-callstack-firebug.php
  24. 0
      framework/views/ca/profile-callstack.php
  25. 0
      framework/views/ca/profile-summary-firebug.php
  26. 0
      framework/views/ca/profile-summary.php
  27. 4
      framework/web/CController.php
  28. 2
      framework/web/CHttpRequest.php
  29. 4
      framework/web/helpers/CHtml.php
  30. 4
      framework/yiilite.php

11
CHANGELOG

@ -1,6 +1,15 @@
 Yii Framework Change Log
Yii Framework Change Log
========================
Version 1.1.25 December 13, 2021
--------------------------------
- Bug #4226: Fix for Gii diff displaying "reset() expects parameter 1 to be array, integer given" (LeoZandvliet, marcovtwout)
- Bug #4369: PHP 8.0 compatibility: Fix warning "Only the first byte will be assigned to the string offset" when generating code with Gii (marcovtwout)
- Bug #4374: Fix for createUpdateCommand which did not accept just a table name when using MSSQL (c-schmitz)
- Bug #4380: Prevent fatal errors while validating CSRF token of malformed requests (rob006)
- Bug #4382: PHP 8.0 compatibility: Fix CFileLogRoute throwing TypeError when logfile cannot be opened (marcovtwout)
Version 1.1.24 June 7, 2021
--------------------------------

5
UPGRADE

@ -18,6 +18,11 @@ General upgrade instructions
issues to Yii issue tracker.
Upgrading from v1.1.24
----------------------
No significant changes were made.
Upgrading from v1.1.23
----------------------

4
framework/YiiBase.php

@ -87,7 +87,7 @@ class YiiBase
*/
public static function getVersion()
{
return '1.1.24';
return '1.1.25';
}
/**
@ -652,7 +652,7 @@ class YiiBase
* Registers a new class autoloader.
* The new autoloader will be placed before {@link autoload} and after
* any other existing autoloaders.
* @param callback $callback a valid PHP callback (function name or array($className,$methodName)).
* @param callable $callback a valid PHP callback (function name or array($className,$methodName)).
* @param boolean $append whether to append the new autoloader after the default Yii autoloader.
* Be careful using this option as it will disable {@link enableIncludePath autoloading via include path}
* when set to true. After this the Yii autoloader can not rely on loading classes via simple include anymore

4
framework/base/CComponent.php

@ -507,7 +507,7 @@ class CComponent
* makes the handler to be invoked first.
*
* @param string $name the event name
* @param callback $handler the event handler
* @param callable $handler the event handler
* @throws CException if the event is not defined
* @see detachEventHandler
*/
@ -520,7 +520,7 @@ class CComponent
* Detaches an existing event handler.
* This method is the opposite of {@link attachEventHandler}.
* @param string $name event name
* @param callback $handler the event handler to be removed
* @param callable $handler the event handler to be removed
* @return boolean if the detachment process is successful
* @see attachEventHandler
*/

4
framework/cli/commands/shell/CrudCommand.php

@ -116,7 +116,7 @@ EOD;
else
{
$last=substr($controllerID,$pos+1);
$last[0]=strtolower($last);
$last[0]=strtolower($last[0]);
$pos2=strpos($controllerID,'/');
$first=substr($controllerID,0,$pos2);
$middle=$pos===$pos2?'':substr($controllerID,$pos2+1,$pos-$pos2);
@ -148,7 +148,7 @@ EOD;
$viewPath=$module->viewPath.DIRECTORY_SEPARATOR.str_replace('.',DIRECTORY_SEPARATOR,$controllerID);
$fixtureName=$this->pluralize($modelClass);
$fixtureName[0]=strtolower($fixtureName);
$fixtureName[0]=strtolower($fixtureName[0]);
$list=array(
basename($controllerFile)=>array(
'source'=>$templatePath.'/controller.php',

4
framework/cli/commands/shell/ModelCommand.php

@ -229,7 +229,7 @@ EOD;
$relationName=rtrim(substr($fkName, 0, -2),'_');
else
$relationName=$fkName;
$relationName[0]=strtolower($relationName);
$relationName[0]=strtolower($relationName[0]);
$rawName=$relationName;
if($multiple)
@ -348,7 +348,7 @@ EOD;
if($unitTestPath!==false)
{
$fixtureName=$this->pluralize($className);
$fixtureName[0]=strtolower($fixtureName);
$fixtureName[0]=strtolower($fixtureName[0]);
$list['unit/'.$className.'Test.php']=array(
'source'=>$templatePath.DIRECTORY_SEPARATOR.'test.php',
'target'=>$unitTestPath.DIRECTORY_SEPARATOR.$className.'Test.php',

0
framework/db/schema/cubrid/CCubridColumnSchema.php

0
framework/db/schema/cubrid/CCubridSchema.php

0
framework/db/schema/cubrid/CCubridTableSchema.php

1
framework/db/schema/mssql/CMssqlCommandBuilder.php

@ -60,6 +60,7 @@ class CMssqlCommandBuilder extends CDbCommandBuilder
*/
public function createUpdateCommand($table,$data,$criteria)
{
$this->ensureTable($table);
$criteria=$this->checkCriteria($table,$criteria);
$fields=array();
$values=array();

9
framework/gii/components/Pear/Text/Diff/Engine/native.php

@ -191,10 +191,7 @@ class Text_Diff_Engine_native {
continue;
}
$matches = $ymatches[$line];
reset($matches);
foreach($matches as $match) {
reset($match);
$y = next($match);
while (($y = array_shift($matches)) !== null) {
if (empty($this->in_seq[$y])) {
$k = $this->_lcsPos($y);
assert($k > 0);
@ -202,9 +199,7 @@ class Text_Diff_Engine_native {
break;
}
}
foreach($matches as $match) {
reset($match);
$y = next($match);
while (($y = array_shift($matches)) !== null) {
if ($y > $this->seq[$k - 1]) {
assert($y <= $this->seq[$k]);
/* Optimization: this is a common case: next match is

2
framework/gii/generators/model/ModelCode.php

@ -405,7 +405,7 @@ class ModelCode extends CCodeModel
$relationName=rtrim(substr($fkName, 0, -2),'_');
else
$relationName=$fkName;
$relationName[0]=strtolower($relationName);
$relationName[0]=strtolower($relationName[0]);
if($multiple)
$relationName=$this->pluralize($relationName);

3
framework/logging/CFileLogRoute.php

@ -154,6 +154,9 @@ class CFileLogRoute extends CLogRoute
$logFile=$this->getLogPath().DIRECTORY_SEPARATOR.$this->getLogFile();
$fp=@fopen($logFile,'a');
if($fp===false)
return;
@flock($fp,LOCK_EX);
if(@filesize($logFile)>$this->getMaxFileSize()*1024)
{

2
framework/validators/CFilterValidator.php

@ -29,7 +29,7 @@
class CFilterValidator extends CValidator
{
/**
* @var callback the filter method
* @var callable the filter method
*/
public $filter;

0
framework/views/ca/error.php

0
framework/views/ca/error400.php

0
framework/views/ca/error403.php

0
framework/views/ca/error404.php

0
framework/views/ca/error500.php

0
framework/views/ca/error503.php

0
framework/views/ca/log-firebug.php

0
framework/views/ca/log.php

0
framework/views/ca/profile-callstack-firebug.php

0
framework/views/ca/profile-callstack.php

0
framework/views/ca/profile-summary-firebug.php

0
framework/views/ca/profile-summary.php

4
framework/web/CController.php

@ -918,7 +918,7 @@ class CController extends CBaseController
* Note, the callback and its parameter values will be serialized and saved in cache.
* Make sure they are serializable.
*
* @param callback $callback a PHP callback which returns the needed dynamic content.
* @param callable $callback a PHP callback which returns the needed dynamic content.
* When the callback is specified as a string, it will be first assumed to be a method of the current
* controller class. If the method does not exist, it is assumed to be a global PHP function.
* Note, the callback should return the dynamic content instead of echoing it.
@ -934,7 +934,7 @@ class CController extends CBaseController
/**
* This method is internally used.
* @param callback $callback a PHP callback which returns the needed dynamic content.
* @param callable $callback a PHP callback which returns the needed dynamic content.
* @param array $params parameters passed to the PHP callback
* @see renderDynamic
*/

2
framework/web/CHttpRequest.php

@ -1364,7 +1364,7 @@ class CHttpRequest extends CApplicationComponent
$maskedUserToken=$this->getDelete($this->csrfTokenName);
}
if (!empty($maskedUserToken) && $cookies->contains($this->csrfTokenName))
if (!empty($maskedUserToken) && is_string($maskedUserToken) && $cookies->contains($this->csrfTokenName))
{
$securityManager=Yii::app()->getSecurityManager();
$maskedCookieToken=$cookies->itemAt($this->csrfTokenName)->value;

4
framework/web/helpers/CHtml.php

@ -101,7 +101,7 @@ class CHtml
*/
public static $renderSpecialAttributesValue=true;
/**
* @var callback the generator used in the {@link CHtml::modelName()} method.
* @var callable the generator used in the {@link CHtml::modelName()} method.
* @since 1.1.14
*/
private static $_modelNameConverter;
@ -2439,7 +2439,7 @@ EOD;
* Set generator used in the {@link CHtml::modelName()} method. You can use the `null` value to restore default
* generator.
*
* @param callback|null $converter the new generator, the model or class name will be passed to the this callback
* @param callable|null $converter the new generator, the model or class name will be passed to this callback
* and result must be a valid value for HTML name attribute.
* @throws CException if $converter isn't a valid callback
* @since 1.1.14

4
framework/yiilite.php

@ -41,7 +41,7 @@ class YiiBase
private static $_logger;
public static function getVersion()
{
return '1.1.24';
return '1.1.25';
}
public static function createWebApplication($config=null)
{
@ -3003,7 +3003,7 @@ class CHttpRequest extends CApplicationComponent
case 'DELETE':
$maskedUserToken=$this->getDelete($this->csrfTokenName);
}
if (!empty($maskedUserToken) && $cookies->contains($this->csrfTokenName))
if (!empty($maskedUserToken) && is_string($maskedUserToken) && $cookies->contains($this->csrfTokenName))
{
$securityManager=Yii::app()->getSecurityManager();
$maskedCookieToken=$cookies->itemAt($this->csrfTokenName)->value;

Loading…
Cancel
Save