Fix thread item validation

This commit is contained in:
RainLoop Team 2014-02-04 15:50:01 +04:00
parent b23551406e
commit cdd1a8e778
5 changed files with 194 additions and 191 deletions

View file

@ -1099,12 +1099,20 @@ class ImapClient extends \MailSo\Net\NetClient
if (\is_numeric($aValue)) if (\is_numeric($aValue))
{ {
$mResult = (int) $aValue; $mResult = (int) $aValue;
if (0 >= $mResult)
{
$mResult = false;
}
} }
else if (\is_array($aValue)) else if (\is_array($aValue))
{ {
if (1 === \count($aValue) && \is_numeric($aValue[0])) if (1 === \count($aValue) && \is_numeric($aValue[0]))
{ {
$mResult = (int) $aValue[0]; $mResult = (int) $aValue[0];
if (0 >= $mResult)
{
$mResult = false;
}
} }
else else
{ {
@ -1120,11 +1128,6 @@ class ImapClient extends \MailSo\Net\NetClient
} }
} }
if (\is_int($mResult) && 0 <= $mResult)
{
$mResult = false;
}
return $mResult; return $mResult;
} }