Code Duplication    Length = 1-3 lines in 2 locations

code/Controllers/AssetAdmin.php 1 location

@@ 409-411 (lines=3) @@
406
		if($record && !$record->canDelete()) {
407
			return Security::permissionFailure();
408
		}
409
		if(!$record || !$record->ID) {
410
			throw new SS_HTTPResponse_Exception("Bad record ID #" . (int)$data['ID'], 404);
411
		}
412
		$parentID = $record->ParentID;
413
		$record->delete();
414
		$this->setCurrentPageID(null);

code/Controllers/CMSMain.php 1 location

@@ 1243-1243 (lines=1) @@
1240
		if($record && !$record->canUnpublish()) {
1241
			return Security::permissionFailure($this);
1242
		}
1243
		if(!$record || !$record->ID) {
1244
			throw new SS_HTTPResponse_Exception("Bad record ID #" . (int)$data['ID'], 404);
1245
		}
1246