Code Duplication    Length = 11-11 lines in 2 locations

Sources/Subs-Db-postgresql.php 1 location

@@ 377-387 (lines=11) @@
374
	if (empty($modSettings['disableQueryCheck']) && strpos($db_string, '\'') !== false && empty($db_values['security_override']))
375
		smf_db_error_backtrace('Hacking attempt...', 'Illegal character (\') used in query...', true, __FILE__, __LINE__);
376
377
	if (empty($db_values['security_override']) && (!empty($db_values) || strpos($db_string, '{db_prefix}') !== false))
378
	{
379
		// Pass some values to the global space for use in the callback function.
380
		$db_callback = array($db_values, $connection);
381
382
		// Inject the values passed to this function.
383
		$db_string = preg_replace_callback('~{([a-z_]+)(?::([a-zA-Z0-9_-]+))?}~', 'smf_db_replacement__callback', $db_string);
384
385
		// This shouldn't be residing in global space any longer.
386
		$db_callback = array();
387
	}
388
389
	// Debugging.
390
	if (isset($db_show_debug) && $db_show_debug === true)

Sources/Subs-Db-mysql.php 1 location

@@ 422-432 (lines=11) @@
419
			$db_string .= "\n\t\t\tORDER BY null";
420
	}
421
422
	if (empty($db_values['security_override']) && (!empty($db_values) || strpos($db_string, '{db_prefix}') !== false))
423
	{
424
		// Pass some values to the global space for use in the callback function.
425
		$db_callback = array($db_values, $connection);
426
427
		// Inject the values passed to this function.
428
		$db_string = preg_replace_callback('~{([a-z_]+)(?::([a-zA-Z0-9_-]+))?}~', 'smf_db_replacement__callback', $db_string);
429
430
		// This shouldn't be residing in global space any longer.
431
		$db_callback = array();
432
	}
433
434
	// Debugging.
435
	if (isset($db_show_debug) && $db_show_debug === true)