Code Duplication    Length = 1-3 lines in 2 locations

code/controllers/AssetAdmin.php 1 location

@@ 338-340 (lines=3) @@
335
		if($record && !$record->canDelete()) {
336
			return Security::permissionFailure();
337
		}
338
		if(!$record || !$record->ID) {
339
			throw new SS_HTTPResponse_Exception("Bad record ID #" . (int)$data['ID'], 404);
340
		}
341
		$parentID = $record->ParentID;
342
		$record->delete();
343
		$this->setCurrentPageID(null);

code/controllers/CMSMain.php 1 location

@@ 1124-1124 (lines=1) @@
1121
		if($record && !$record->canUnpublish()) {
1122
			return Security::permissionFailure($this);
1123
		}
1124
		if(!$record || !$record->ID) {
1125
			throw new SS_HTTPResponse_Exception("Bad record ID #" . (int)$data['ID'], 404);
1126
		}
1127