Code Duplication    Length = 2-5 lines in 4 locations

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;

Sources/RepairBoards.php 2 locations

@@ 1763-1764 (lines=2) @@
1760
			'cat_name' => $txt['salvaged_category_name'],
1761
		)
1762
	);
1763
	if ($smcFunc['db_num_rows']($result) != 0)
1764
		list ($salvageCatID) = $smcFunc['db_fetch_row']($result);
1765
	$smcFunc['db_free_result']($result);
1766
1767
	if (empty($salvageCatID))
@@ 1796-1797 (lines=2) @@
1793
			'board_name' => $txt['salvaged_board_name'],
1794
		)
1795
	);
1796
	if ($smcFunc['db_num_rows']($result) != 0)
1797
		list ($salvageBoardID) = $smcFunc['db_fetch_row']($result);
1798
	$smcFunc['db_free_result']($result);
1799
1800
	if (empty($salvageBoardID))

other/install.php 1 location

@@ 1684-1685 (lines=2) @@
1681
			'db_error_skip' => true,
1682
		)
1683
	);
1684
	if ($smcFunc['db_num_rows']($result) != 0)
1685
		list ($db_sessions) = $smcFunc['db_fetch_row']($result);
1686
	$smcFunc['db_free_result']($result);
1687
1688
	if (empty($db_sessions))