Pixel Чтобы добавлять в избранное, нужно авторизироваться

php / Странная логика

/** 
 * @access  public
 * @return  string
 */
function getSql()
{
  if( !$criteria = $this->criteria )
  {
    error_log('...');
    return '';
  }

  return $this->criteria->getQuery();
}
почему не использовать if(isset($this->criteria)) или if(isset($this->criteria)) или if($this->criteria instanceOf SOMEOBJECT)
2010-05-19 11:45:08

Comments

There is no comment for the moment. Add a new comment