PHP 8.2 Deprecated cleaning

This commit is contained in:
2023-04-03 21:15:54 +02:00
parent 528b959859
commit d34d5a820a
6 changed files with 65 additions and 64 deletions

View File

@@ -12,7 +12,10 @@ namespace Domframework;
user by its groups membership */
class Authzgroups
{
/** The table prefix to use */
/**
* The table prefix to use
* @var string
*/
public $tableprefix = "";
/** The dblayer object use to manage the Object table */
private $dbObject = null;
@@ -334,7 +337,7 @@ class Authzgroups
$this->dbObject = new Dblayer($dsn, $username, $password, $driver_options);
$this->dbObject->debug = $this->debug;
$this->dbObject->table = "authzobject";
$this->dbObject->prefix = $this->tableprefix;
$this->dbObject->tableprefix = $this->tableprefix;
$this->dbObject->fields = array(
"idobject" => array("integer", "not null", "autoincrement"),
"module" => array("varchar", "255", "not null"),
@@ -351,7 +354,7 @@ class Authzgroups
$this->dbGroup = new Dblayer($dsn, $username, $password, $driver_options);
$this->dbGroup->debug = $this->debug;
$this->dbGroup->table = "authzgroup";
$this->dbGroup->prefix = $this->tableprefix;
$this->dbGroup->tableprefix = $this->tableprefix;
$this->dbGroup->fields = array(
"idgroup" => array("integer", "not null", "autoincrement"),
"module" => array("varchar", "255", "not null"),
@@ -373,7 +376,7 @@ class Authzgroups
);
$this->dbGroupMember->debug = $this->debug;
$this->dbGroupMember->table = "authzgroupmember";
$this->dbGroupMember->prefix = $this->tableprefix;
$this->dbGroupMember->tableprefix = $this->tableprefix;
$this->dbGroupMember->fields = array(
"idgroupmember" => array("integer", "not null", "autoincrement"),
"user" => array("varchar", "255", "not null"),
@@ -394,7 +397,7 @@ class Authzgroups
$this->dbRight = new Dblayer($dsn, $username, $password, $driver_options);
$this->dbRight->debug = $this->debug;
$this->dbRight->table = "authzright";
$this->dbRight->prefix = $this->tableprefix;
$this->dbRight->tableprefix = $this->tableprefix;
$this->dbRight->fields = array(
"idright" => array("integer", "not null", "autoincrement"),
"idgroup" => array("integer", "not null"),

View File

@@ -234,6 +234,9 @@ extendedKeyUsage = serverAuth, clientAuth
$days = 365,
$altNames = array()
) {
if ($days === null) {
$days = 365;
}
$conf = $this->opensslConf;
if (! empty($altNames)) {
// Copy the commonName from CSR request into subjectAltName

View File

@@ -1044,7 +1044,7 @@ class Dblayeroo
if ($col["is_nullable"] === "NO") {
$tmp[] = "not null";
}
if (substr($col["column_default"], 0, 7) === "nextval") {
if (is_string($col["column_default"]) && substr($col["column_default"], 0, 7) === "nextval") {
$tmp[] = "autoincrement";
$primary = $col["column_name"];
}

View File

@@ -362,7 +362,7 @@ class Mail
$headersSplit = preg_split(
"#([\r\n]+)#",
$headersEML,
null,
-1,
PREG_SPLIT_DELIM_CAPTURE
);
for ($i = 0; $i < count($headersSplit); $i = $i + 2) {