Not a bug XenForo_Option_AdminSearchExclusions::verifyOption - unused parameter

James

Well-known member
PHP:
public static function verifyOption(array &$choices, XenForo_DataWriter $dw, $fieldName)
	{
		if ($dw->isInsert())
		{
			// insert - just trust the default value
			return true;
		}

		$exclusions = array();

		foreach (XenForo_Model::create('XenForo_Model_AdminSearch')->getAllSearchTypes() AS $searchType => $handlerName)
		{
			if (empty($choices[$searchType]))
			{
				$exclusions[$searchType] = true;
			}
		}

		$choices = $exclusions;

		return true;
	}

The parameter $fieldName isn't used anywhere in the function.
 
Top Bottom