Don't suppress functions

This commit is contained in:
djmaze 2020-03-20 15:29:52 +01:00
parent 1009398d0c
commit 559ebe0f28
28 changed files with 244 additions and 265 deletions

View file

@ -131,7 +131,7 @@ class Property
// lower value for searching
if ($this->IsValueForLower() && \MailSo\Base\Utils::FunctionExistsAndEnabled('mb_strtolower'))
{
$this->ValueLower = (string) @\mb_strtolower($this->Value, 'UTF-8');
$this->ValueLower = (string) \mb_strtolower($this->Value, 'UTF-8');
}
// phone value for searching

View file

@ -1869,7 +1869,7 @@ SQLITEINITIAL;
return '%'.\str_replace(array($sEscapeSign, '_', '%'),
array($sEscapeSign.$sEscapeSign, $sEscapeSign.'_', $sEscapeSign.'%'),
(string) @\mb_strtolower($sSearch, 'UTF-8')).'%';
(string) \mb_strtolower($sSearch, 'UTF-8')).'%';
}
private function specialConvertSearchValueCustomPhone(string $sSearch) : string

View file

@ -97,7 +97,7 @@ class DefaultDomain implements \RainLoop\Providers\Domain\DomainAdminInterface
if (\file_exists($this->sDomainPath.'/disabled'))
{
$sDisabled = @\file_get_contents($this->sDomainPath.'/disabled');
$sDisabled = \file_get_contents($this->sDomainPath.'/disabled');
}
if (\file_exists($this->sDomainPath.'/'.$sRealFileName.'.ini') &&
@ -183,7 +183,7 @@ class DefaultDomain implements \RainLoop\Providers\Domain\DomainAdminInterface
$sFile = '';
if (\file_exists($this->sDomainPath.'/disabled'))
{
$sFile = @\file_get_contents($this->sDomainPath.'/disabled');
$sFile = \file_get_contents($this->sDomainPath.'/disabled');
}
$aResult = array();
@ -245,7 +245,7 @@ class DefaultDomain implements \RainLoop\Providers\Domain\DomainAdminInterface
$aAliases = array();
// $aList = \glob($this->sDomainPath.'/*.{ini,alias}', GLOB_BRACE);
$aList = @\array_diff(\scandir($this->sDomainPath), array('.', '..'));
$aList = \array_diff(\scandir($this->sDomainPath), array('.', '..'));
if (\is_array($aList))
{
foreach ($aList as $sFile)
@ -291,7 +291,7 @@ class DefaultDomain implements \RainLoop\Providers\Domain\DomainAdminInterface
$aDisabledNames = array();
if (0 < \count($aResult) && \file_exists($this->sDomainPath.'/disabled'))
{
$sDisabled = @\file_get_contents($this->sDomainPath.'/disabled');
$sDisabled = \file_get_contents($this->sDomainPath.'/disabled');
if (false !== $sDisabled && 0 < strlen($sDisabled))
{
$aDisabledNames = \explode(',', $sDisabled);

View file

@ -30,11 +30,11 @@ class FileStorage implements \RainLoop\Providers\Files\IFiles
$bResult = false;
if ($rSource)
{
$rOpenOutput = @\fopen($this->generateFullFileName($oAccount, $sKey, true), 'w+b');
$rOpenOutput = \fopen($this->generateFullFileName($oAccount, $sKey, true), 'w+b');
if ($rOpenOutput)
{
$bResult = (false !== \MailSo\Base\Utils::MultipleStreamWriter($rSource, array($rOpenOutput)));
@\fclose($rOpenOutput);
\fclose($rOpenOutput);
}
}
return $bResult;
@ -42,7 +42,7 @@ class FileStorage implements \RainLoop\Providers\Files\IFiles
public function MoveUploadedFile(\RainLoop\Model\Account $oAccount, string $sKey, string $sSource) : bool
{
return @\move_uploaded_file($sSource,
return \move_uploaded_file($sSource,
$this->generateFullFileName($oAccount, $sKey, true));
}
@ -57,7 +57,7 @@ class FileStorage implements \RainLoop\Providers\Files\IFiles
$sFileName = $this->generateFullFileName($oAccount, $sKey, $bCreate);
if ($bCreate || \file_exists($sFileName))
{
$mResult = @\fopen($sFileName, $sOpenMode);
$mResult = \fopen($sFileName, $sOpenMode);
if (\is_resource($mResult))
{
@ -88,10 +88,10 @@ class FileStorage implements \RainLoop\Providers\Files\IFiles
{
if (isset($this->aResources[$sFileName]) && \is_resource($this->aResources[$sFileName]))
{
@\fclose($this->aResources[$sFileName]);
\fclose($this->aResources[$sFileName]);
}
$mResult = @\unlink($sFileName);
$mResult = \unlink($sFileName);
}
return $mResult;
@ -111,7 +111,7 @@ class FileStorage implements \RainLoop\Providers\Files\IFiles
public function FileExists(\RainLoop\Model\Account $oAccount, string $sKey) : bool
{
return @\file_exists($this->generateFullFileName($oAccount, $sKey));
return \file_exists($this->generateFullFileName($oAccount, $sKey));
}
public function GC(int $iTimeToClearInHours = 24) : bool
@ -133,7 +133,7 @@ class FileStorage implements \RainLoop\Providers\Files\IFiles
{
if (!empty($sFileName) && \is_resource($rFile))
{
@\fclose($rFile);
\fclose($rFile);
}
}
}
@ -166,9 +166,9 @@ class FileStorage implements \RainLoop\Providers\Files\IFiles
(0 < \strlen($sSubEmail) ? $sSubEmail.'/' : '').
$sKeyPath;
if ($bMkDir && !empty($sFilePath) && !@\is_dir(\dirname($sFilePath)))
if ($bMkDir && !empty($sFilePath) && !\is_dir(\dirname($sFilePath)))
{
if (!@\mkdir(\dirname($sFilePath), 0755, true))
if (!\mkdir(\dirname($sFilePath), 0755, true))
{
throw new \RainLoop\Exceptions\Exception('Can\'t make storage directory "'.$sFilePath.'"');
}

View file

@ -31,7 +31,7 @@ class FileStorage implements \RainLoop\Providers\Storage\IStorage
*/
public function Put($oAccount, int $iStorageType, string $sKey, string $sValue) : bool
{
return false !== @\file_put_contents(
return false !== \file_put_contents(
$this->generateFileName($oAccount, $iStorageType, $sKey, true), $sValue);
}
@ -62,7 +62,7 @@ class FileStorage implements \RainLoop\Providers\Storage\IStorage
$sFileName = $this->generateFileName($oAccount, $iStorageType, $sKey);
if (\file_exists($sFileName))
{
$mResult = @\unlink($sFileName);
$mResult = \unlink($sFileName);
}
return $mResult;
@ -154,9 +154,9 @@ class FileStorage implements \RainLoop\Providers\Storage\IStorage
($bForDeleteAction ? '' : $sKeyPath);
}
if ($bMkDir && !$bForDeleteAction && !empty($sFilePath) && !@\is_dir(\dirname($sFilePath)))
if ($bMkDir && !$bForDeleteAction && !empty($sFilePath) && !\is_dir(\dirname($sFilePath)))
{
if (!@\mkdir(\dirname($sFilePath), 0755, true))
if (!\mkdir(\dirname($sFilePath), 0755, true))
{
throw new \RainLoop\Exceptions\Exception('Can\'t make storage directory "'.$sFilePath.'"');
}

View file

@ -9,7 +9,7 @@ class TemproryApcStorage extends \RainLoop\Providers\Storage\FileStorage
*/
public function Put($oAccount, int $iStorageType, string $sKey, string $sValue) : bool
{
return !!@\apc_store($this->generateFileName($oAccount, $iStorageType, $sKey, true), $sValue);
return !!\apc_store($this->generateFileName($oAccount, $iStorageType, $sKey, true), $sValue);
}
/**
@ -21,7 +21,7 @@ class TemproryApcStorage extends \RainLoop\Providers\Storage\FileStorage
public function Get($oAccount, int $iStorageType, string $sKey, $mDefault = false)
{
$bValue = false;
$mValue = @\apc_fetch($this->generateFileName($oAccount, $iStorageType, $sKey), $bValue);
$mValue = \apc_fetch($this->generateFileName($oAccount, $iStorageType, $sKey), $bValue);
if (!$bValue)
{
$mValue = $mDefault;
@ -35,7 +35,7 @@ class TemproryApcStorage extends \RainLoop\Providers\Storage\FileStorage
*/
public function Clear($oAccount, int $iStorageType, string $sKey) : bool
{
@\apc_delete($this->generateFileName($oAccount, $iStorageType, $sKey));
\apc_delete($this->generateFileName($oAccount, $iStorageType, $sKey));
return true;
}