Code Duplication    Length = 2-3 lines in 2 locations

control/RequestHandler.php 1 location

@@ 187-189 (lines=3) @@
184
				Debug::message("Action not set; using default action method name 'index'");
185
			}
186
			$action = "index";
187
		} else if(!is_string($action)) {
188
			user_error("Non-string method name: " . var_export($action, true), E_USER_ERROR);
189
		}
190
191
		$classMessage = Director::isLive() ? 'on this handler' : 'on class '.get_class($this);
192

core/Core.php 1 location

@@ 158-159 (lines=2) @@
155
function singleton($className) {
156
	if($className == "Config") user_error("Don't pass Config to singleton()", E_USER_ERROR);
157
	if(!isset($className)) user_error("singleton() Called without a class", E_USER_ERROR);
158
	if(!is_string($className)) user_error("singleton() passed bad class_name: " . var_export($className,true),
159
		E_USER_ERROR);
160
	return Injector::inst()->get($className);
161
}
162