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

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