1. PHP / Говнокод #7370

    +147

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    // Базовые проверки на тип переменных
    if ((isset($this->params['month']) && (string)$this->params['month']!==(string)(int)$this->params['month'])
    	|| (isset($this->params['season']) && (string)$this->params['season']!==(string)(int)$this->params['season'])
    	|| (isset($this->params['year']) && (string)$this->params['year'] !== (string)(int)$this->params['year']) // проверки на вхождение в диапзон дат
    	|| (isset($this->params['year']) && !in_array($this->params['year'], $this->data['years']))
    	|| (isset($this->params['season']) && !isset($this->data['seasons'][(string)(int)$this->params['season']]))
    	|| (isset($this->params['month']) && !isset($this->data['monthes'][(string)(int)$this->params['month']])) || false
    	|| (isset($this->params['month']) && isset($this->params['season']) && !in_array((string)(int)$this->params['month'], $this->data['seasons_monthes'][(string)(int)$this->params['season']])))

    Запостил: sectronov, 28 Июля 2011

    Комментарии (4) RSS

    Добавить комментарий