mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-11-04 14:46:19 +08:00 
			
		
		
		
	minor fixes.
This commit is contained in:
		@ -21,7 +21,7 @@ use yii\base\InvalidParamException;
 | 
				
			|||||||
 * Access Control (RBAC).
 | 
					 * Access Control (RBAC).
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * The main idea is that permissions are organized as a hierarchy of
 | 
					 * The main idea is that permissions are organized as a hierarchy of
 | 
				
			||||||
 * [[Item]] authorization items. Items on higer level inherit the permissions
 | 
					 * [[Item]] authorization items. Items on higher level inherit the permissions
 | 
				
			||||||
 * represented by items on lower level. And roles are simply top-level authorization items
 | 
					 * represented by items on lower level. And roles are simply top-level authorization items
 | 
				
			||||||
 * that may be assigned to individual users. A user is said to have a permission
 | 
					 * that may be assigned to individual users. A user is said to have a permission
 | 
				
			||||||
 * to do something if the corresponding authorization item is inherited by one of his roles.
 | 
					 * to do something if the corresponding authorization item is inherited by one of his roles.
 | 
				
			||||||
 | 
				
			|||||||
@ -577,7 +577,7 @@ class Request extends \yii\base\Request
 | 
				
			|||||||
			$pathInfo = substr($pathInfo, strlen($scriptUrl));
 | 
								$pathInfo = substr($pathInfo, strlen($scriptUrl));
 | 
				
			||||||
		} elseif ($baseUrl === '' || strpos($pathInfo, $baseUrl) === 0) {
 | 
							} elseif ($baseUrl === '' || strpos($pathInfo, $baseUrl) === 0) {
 | 
				
			||||||
			$pathInfo = substr($pathInfo, strlen($baseUrl));
 | 
								$pathInfo = substr($pathInfo, strlen($baseUrl));
 | 
				
			||||||
		} elseif (strpos($_SERVER['PHP_SELF'], $scriptUrl) === 0) {
 | 
							} elseif (isset($_SERVER['PHP_SELF']) && strpos($_SERVER['PHP_SELF'], $scriptUrl) === 0) {
 | 
				
			||||||
			$pathInfo = substr($_SERVER['PHP_SELF'], strlen($scriptUrl));
 | 
								$pathInfo = substr($_SERVER['PHP_SELF'], strlen($scriptUrl));
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			throw new InvalidConfigException('Unable to determine the path info of the current request.');
 | 
								throw new InvalidConfigException('Unable to determine the path info of the current request.');
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user