Code Duplication    Length = 2-5 lines in 4 locations

Sources/RepairBoards.php 2 locations

@@ 1808-1809 (lines=2) @@
1805
			'cat_name' => $txt['salvaged_category_name'],
1806
		)
1807
	);
1808
	if ($smcFunc['db_num_rows']($result) != 0)
1809
		list ($salvageCatID) = $smcFunc['db_fetch_row']($result);
1810
	$smcFunc['db_free_result']($result);
1811
1812
	if (empty($salvageCatID))
@@ 1842-1843 (lines=2) @@
1839
			'board_name' => $txt['salvaged_board_name'],
1840
		)
1841
	);
1842
	if ($smcFunc['db_num_rows']($result) != 0)
1843
		list ($salvageBoardID) = $smcFunc['db_fetch_row']($result);
1844
	$smcFunc['db_free_result']($result);
1845
1846
	if (empty($salvageBoardID))

Sources/Subs-Boards.php 1 location

@@ 435-439 (lines=5) @@
432
			'selected_message' => (int) $messageID,
433
		)
434
	);
435
	if ($smcFunc['db_num_rows']($result) > 0)
436
		list ($memberID) = $smcFunc['db_fetch_row']($result);
437
	// The message doesn't even exist.
438
	else
439
		$memberID = 0;
440
	$smcFunc['db_free_result']($result);
441
442
	return (int) $memberID;

other/install.php 1 location

@@ 1599-1600 (lines=2) @@
1596
			'db_error_skip' => true,
1597
		)
1598
	);
1599
	if ($smcFunc['db_num_rows']($result) != 0)
1600
		list ($db_sessions) = $smcFunc['db_fetch_row']($result);
1601
	$smcFunc['db_free_result']($result);
1602
1603
	if (empty($db_sessions))