[php] add PHP error handler and remove @ error-control operator

This commit is contained in:
nao-pon
2016-05-13 17:13:31 +09:00
parent 844fd6804e
commit e88048a205
15 changed files with 263 additions and 201 deletions
+7 -7
View File
@@ -99,7 +99,7 @@ class elFinderVolumeMySQL extends elFinderVolumeDriver {
$this->db = new mysqli($this->options['host'], $this->options['user'], $this->options['pass'], $this->options['db'], $this->options['port'], $this->options['socket']);
if ($this->db->connect_error || @mysqli_connect_error()) {
if ($this->db->connect_error || mysqli_connect_error()) {
return false;
}
@@ -136,8 +136,8 @@ class elFinderVolumeMySQL extends elFinderVolumeDriver {
if (($tmp = $this->options['tmpPath'])) {
if (!file_exists($tmp)) {
if (@mkdir($tmp)) {
@chmod($tmp, $this->options['tmbPathMode']);
if (mkdir($tmp)) {
chmod($tmp, $this->options['tmbPathMode']);
}
}
@@ -599,8 +599,8 @@ class elFinderVolumeMySQL extends elFinderVolumeDriver {
**/
protected function _fopen($path, $mode='rb') {
$fp = $this->tmbPath
? @fopen($this->getTempFile($path), 'w+')
: @tmpfile();
? fopen($this->getTempFile($path), 'w+')
: tmpfile();
if ($fp) {
@@ -626,9 +626,9 @@ class elFinderVolumeMySQL extends elFinderVolumeDriver {
* @author Dmitry (dio) Levashov
*/
protected function _fclose($fp, $path='') {
@fclose($fp);
fclose($fp);
if ($path) {
@unlink($this->getTempFile($path));
unlink($this->getTempFile($path));
}
}