Code Duplication    Length = 1-3 lines in 2 locations

code/controllers/AssetAdmin.php 1 location

@@ 349-351 (lines=3) @@
346
		if($record && !$record->canDelete()) {
347
			return Security::permissionFailure();
348
		}
349
		if(!$record || !$record->ID) {
350
			throw new SS_HTTPResponse_Exception("Bad record ID #" . (int)$data['ID'], 404);
351
		}
352
		$parentID = $record->ParentID;
353
		$record->delete();
354
		$this->setCurrentPageID(null);

code/controllers/CMSMain.php 1 location

@@ 1155-1155 (lines=1) @@
1152
		if($record && !$record->canUnpublish()) {
1153
			return Security::permissionFailure($this);
1154
		}
1155
		if(!$record || !$record->ID) {
1156
			throw new SS_HTTPResponse_Exception("Bad record ID #" . (int)$data['ID'], 404);
1157
		}
1158