HOR-3769
Fix Net class and error reporting level.
This commit is contained in:
@@ -485,6 +485,7 @@ class WebApplication
|
|||||||
// Change storage path
|
// Change storage path
|
||||||
app()->useStoragePath(realpath(PATH_DATA));
|
app()->useStoragePath(realpath(PATH_DATA));
|
||||||
app()->make(Kernel::class)->bootstrap();
|
app()->make(Kernel::class)->bootstrap();
|
||||||
|
error_reporting(error_reporting() & ~E_STRICT & ~E_DEPRECATED);
|
||||||
|
|
||||||
\Bootstrap::setLanguage();
|
\Bootstrap::setLanguage();
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ use Illuminate\Foundation\Console\Kernel;
|
|||||||
require_once __DIR__ . '/gulliver/system/class.g.php';
|
require_once __DIR__ . '/gulliver/system/class.g.php';
|
||||||
require_once __DIR__ . '/bootstrap/autoload.php';
|
require_once __DIR__ . '/bootstrap/autoload.php';
|
||||||
require_once __DIR__ . '/bootstrap/app.php';
|
require_once __DIR__ . '/bootstrap/app.php';
|
||||||
$app->make(Kernel::class)->bootstrap();
|
|
||||||
|
|
||||||
$scriptDir = dirname(__FILE__).'/';
|
$scriptDir = dirname(__FILE__).'/';
|
||||||
|
|
||||||
|
|||||||
@@ -19,13 +19,49 @@ class Net
|
|||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$a = func_get_args();
|
$a = func_get_args();
|
||||||
$f = "__construct" . func_num_args();
|
$f = "init" . func_num_args();
|
||||||
|
|
||||||
if (method_exists($this, $f)) {
|
if (method_exists($this, $f)) {
|
||||||
call_user_func_array(array($this, $f), $a);
|
call_user_func_array(array($this, $f), $a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is the constructor of the class net
|
||||||
|
*
|
||||||
|
* return void
|
||||||
|
*/
|
||||||
|
protected function init0()
|
||||||
|
{
|
||||||
|
$this->errno = 0;
|
||||||
|
$this->error = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function is the constructor of the class net
|
||||||
|
*
|
||||||
|
* @param string $pHost
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function init1($pHost)
|
||||||
|
{
|
||||||
|
$this->errno = 0;
|
||||||
|
$this->errstr = "";
|
||||||
|
$this->db_instance = "";
|
||||||
|
|
||||||
|
unset($this->db_user);
|
||||||
|
unset($this->db_passwd);
|
||||||
|
unset($this->db_sourcename);
|
||||||
|
|
||||||
|
#verifing valid param
|
||||||
|
if ($pHost == "") {
|
||||||
|
$this->errno = 1000;
|
||||||
|
$this->errstr = "NET::You must specify a host";
|
||||||
|
//$this->showMsg();
|
||||||
|
}
|
||||||
|
$this->resolv($pHost);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function puts a host
|
* This function puts a host
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user