Проверка правила

This commit is contained in:
origami11 2017-06-06 10:16:44 +03:00
parent b82d93905a
commit 4507f7f9d5
2 changed files with 2 additions and 2 deletions

View file

@ -81,7 +81,7 @@ class Connection_HttpRequest
$port = ($this->proxy_port) ? $this->proxy_port : $this->port; $port = ($this->proxy_port) ? $this->proxy_port : $this->port;
$errno = 0; $errno = 0;
$errstr = ''; $errstr = '';
$socket = fsockopen($host, $port, $errno, $errstr, 30); $socket = @fsockopen($host, $port, $errno, $errstr, 30);
if (is_resource($socket)) { if (is_resource($socket)) {
$header = $this->getHeader(); $header = $this->getHeader();
fwrite($socket, $header); fwrite($socket, $header);

View file

@ -61,7 +61,7 @@ class Validator_Validator
$ruleObj->$p_name = $p_value; $ruleObj->$p_name = $p_value;
} }
$this->addRule($ruleObj); $this->addRule($ruleObj);
} else { } else if (!empty($rule)) {
throw new Exception('Unknown validation rule "' . $rule . "'"); throw new Exception('Unknown validation rule "' . $rule . "'");
} }
} }