Fix Net class and error reporting level.
This commit is contained in:
David Callizaya
2017-08-25 10:57:20 -04:00
parent e3c0d6e6ca
commit 52322493df
3 changed files with 38 additions and 2 deletions

View File

@@ -485,6 +485,7 @@ class WebApplication
// Change storage path
app()->useStoragePath(realpath(PATH_DATA));
app()->make(Kernel::class)->bootstrap();
error_reporting(error_reporting() & ~E_STRICT & ~E_DEPRECATED);
\Bootstrap::setLanguage();

View File

@@ -6,7 +6,6 @@ use Illuminate\Foundation\Console\Kernel;
require_once __DIR__ . '/gulliver/system/class.g.php';
require_once __DIR__ . '/bootstrap/autoload.php';
require_once __DIR__ . '/bootstrap/app.php';
$app->make(Kernel::class)->bootstrap();
$scriptDir = dirname(__FILE__).'/';

View File

@@ -19,13 +19,49 @@ class Net
public function __construct()
{
$a = func_get_args();
$f = "__construct" . func_num_args();
$f = "init" . func_num_args();
if (method_exists($this, $f)) {
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
*