mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-11-04 06:37:55 +08:00 
			
		
		
		
	Bug #17933: Log warning instead of erroring when URLManager is unable to initialize cache
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							f8d417c42a
						
					
				
				
					commit
					fbd7eded2d
				
			@ -4,6 +4,7 @@ Yii Framework 2 Change Log
 | 
			
		||||
2.0.34 under development
 | 
			
		||||
------------------------
 | 
			
		||||
 | 
			
		||||
- Bug #17933: Log warning instead of erroring when URLManager is unable to initialize cache (samdark)
 | 
			
		||||
- Bug #17935: Reset DB quoted table/column name caches when the connection is closed (brandonkelly)
 | 
			
		||||
- Bug #17932: Fix regression in detection of AJAX requests (samdark)
 | 
			
		||||
- Bug #17934: Fix regression in Oracle when binding several string parameters (fen1xpv, samdark)
 | 
			
		||||
 | 
			
		||||
@ -631,7 +631,7 @@ abstract class Application extends Module
 | 
			
		||||
            'mailer' => ['class' => 'yii\swiftmailer\Mailer'],
 | 
			
		||||
            'urlManager' => ['class' => 'yii\web\UrlManager'],
 | 
			
		||||
            'assetManager' => ['class' => 'yii\web\AssetManager'],
 | 
			
		||||
            'security' => ['class' => 'yii\base\Security'],
 | 
			
		||||
            'security' => ['class' => 'yii\base\Security']
 | 
			
		||||
        ];
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -186,7 +186,11 @@ class UrlManager extends Component
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
        if ($this->cache !== false && $this->cache !== null) {
 | 
			
		||||
            try {
 | 
			
		||||
                $this->cache = Instance::ensure($this->cache, 'yii\caching\CacheInterface');
 | 
			
		||||
            } catch (InvalidConfigException $e) {
 | 
			
		||||
                Yii::warning('Unable to use cache for URL manager: ' . $e->getMessage());
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        if (empty($this->rules)) {
 | 
			
		||||
            return;
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user