• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/model/entity.php
  • Класс: BitrixCatalogModelEntity
  • Вызов: Entity::prepareIntValue
static function prepareIntValue($value): ?int
{
	if ($value === null)
	{
		return null;
	}

	$result = null;
	if (is_string($value))
	{
		if ($value !== '' && is_numeric($value))
		{
			$result = (int)$value;
		}
	}
	elseif (is_int($value))
	{
		$result = $value;
	}

	return $result;
}