Code Duplication    Length = 2-3 lines in 2 locations

control/RequestHandler.php 1 location

@@ 208-210 (lines=3) @@
205
				Debug::message("Action not set; using default action method name 'index'");
206
			}
207
			$action = "index";
208
		} else if(!is_string($action)) {
209
			user_error("Non-string method name: " . var_export($action, true), E_USER_ERROR);
210
		}
211
212
		$classMessage = Director::isLive() ? 'on this handler' : 'on class '.get_class($this);
213

core/Core.php 1 location

@@ 164-165 (lines=2) @@
161
function singleton($className) {
162
	if($className == "Config") user_error("Don't pass Config to singleton()", E_USER_ERROR);
163
	if(!isset($className)) user_error("singleton() Called without a class", E_USER_ERROR);
164
	if(!is_string($className)) user_error("singleton() passed bad class_name: " . var_export($className,true),
165
		E_USER_ERROR);
166
	return Injector::inst()->get($className);
167
}
168