Skip to content
Permalink
Browse files

Fix for PHP 7.2+

  • Loading branch information
fappels committed Dec 20, 2019
1 parent fee2fa0 commit a727d968218b0cda707df3ce49cfc1ffaeeb48f1
@@ -47,7 +47,7 @@ function __construct($login)
global $langs,$db,$user;

if (!empty($login)) {
if (get_class($db) == get_class($login) || $user->id > 0 || $user->fetch('', $login, '', 1) > 0) {
if ((is_object($login) && get_class($db) == get_class($login)) || $user->id > 0 || $user->fetch('', $login, '', 1) > 0) {
$user->getrights();
$this->_user = $user;
if (isset($this->_user->conf->MAIN_LANG_DEFAULT) && ($this->_user->conf->MAIN_LANG_DEFAULT != 'auto')) {
@@ -51,7 +51,7 @@ public function __construct($login)
global $langs,$db,$user;

if (!empty($login)) {
if (get_class($db) == get_class($login) || $user->id > 0 || $user->fetch('', $login, '', 1) > 0) {
if ((is_object($login) && get_class($db) == get_class($login)) || $user->id > 0 || $user->fetch('', $login, '', 1) > 0) {
$user->getrights();
$this->_user = $user; //product.class uses global user
if (isset($this->_user->conf->MAIN_LANG_DEFAULT) && ($this->_user->conf->MAIN_LANG_DEFAULT != 'auto')) {
@@ -50,7 +50,7 @@ public function __construct($login)
global $langs,$db,$user;

if (!empty($login)) {
if (get_class($db) == get_class($login) || $user->id > 0 || $user->fetch('', $login, '', 1) > 0) {
if ((is_object($login) && get_class($db) == get_class($login)) || $user->id > 0 || $user->fetch('', $login, '', 1) > 0) {
$user->getrights();
$this->_user = $user; //commande.class uses global user
if (isset($this->_user->conf->MAIN_LANG_DEFAULT) && ($this->_user->conf->MAIN_LANG_DEFAULT != 'auto')) {
@@ -64,7 +64,7 @@ public function __construct($login)
global $langs,$db,$user;

if (!empty($login)) {
if (get_class($db) == get_class($login) || $user->id > 0 || $user->fetch('', $login, '', 1) > 0) {
if ((is_object($login) && get_class($db) == get_class($login)) || $user->id > 0 || $user->fetch('', $login, '', 1) > 0) {
$user->getrights();
$this->_user = $user; //commande.class uses global user
if (isset($this->_user->conf->MAIN_LANG_DEFAULT) && ($this->_user->conf->MAIN_LANG_DEFAULT != 'auto')) {
@@ -45,7 +45,7 @@ function __construct($login)
global $user,$db,$langs;

if (!empty($login)) {
if (get_class($db) == get_class($login) || $user->id > 0 || $user->fetch('', $login, '', 1) > 0) {
if ((is_object($login) && get_class($db) == get_class($login)) || $user->id > 0 || $user->fetch('', $login, '', 1) > 0) {
$user->getrights();
$this->_user = $user; //commande.class uses global user
if (isset($this->_user->conf->MAIN_LANG_DEFAULT) && ($this->_user->conf->MAIN_LANG_DEFAULT != 'auto')) {
@@ -51,7 +51,7 @@ public function __construct($login)
global $langs,$user,$db;

if (!empty($login)) {
if (get_class($db) == get_class($login) || $user->id > 0 || $user->fetch('', $login, '', 1) > 0) {
if ((is_object($login) && get_class($db) == get_class($login)) || $user->id > 0 || $user->fetch('', $login, '', 1) > 0) {
$user->getrights();
$this->_user = $user; //commande.class uses global user
if (isset($this->_user->conf->MAIN_LANG_DEFAULT) && ($this->_user->conf->MAIN_LANG_DEFAULT != 'auto')) {
@@ -54,7 +54,7 @@ public function __construct($login)
global $langs,$db,$user;

if (!empty($login)) {
if (get_class($db) == get_class($login) || $user->id > 0 || $user->fetch('', $login, '', 1) > 0) {
if ((is_object($login) && get_class($db) == get_class($login)) || $user->id > 0 || $user->fetch('', $login, '', 1) > 0) {
$user->getrights();
$this->_user = $user; //commande.class uses global user
if (isset($this->_user->conf->MAIN_LANG_DEFAULT) && ($this->_user->conf->MAIN_LANG_DEFAULT != 'auto')) {
@@ -47,7 +47,7 @@ public function __construct($login)
global $langs,$user,$db;

if (!empty($login)) {
if (get_class($db) == get_class($login) || $user->id > 0 || $user->fetch('', $login, '', 1) > 0) {
if ((is_object($login) && get_class($db) == get_class($login)) || $user->id > 0 || $user->fetch('', $login, '', 1) > 0) {
$user->getrights();
$this->_user = $user; //commande.class uses global user
if (isset($this->_user->conf->MAIN_LANG_DEFAULT) && ($this->_user->conf->MAIN_LANG_DEFAULT != 'auto')) {
@@ -54,7 +54,7 @@ public function __construct($login)
global $langs,$db,$user,$conf;

if (!empty($login)) {
if (get_class($db) == get_class($login) || $user->id > 0 || $user->fetch('', $login, '', 1) > 0) {
if ((is_object($login) && get_class($db) == get_class($login)) || $user->id > 0 || $user->fetch('', $login, '', 1) > 0) {
$user->getrights();
$this->_user = $user; //product.class uses global user
if (isset($this->_user->conf->MAIN_LANG_DEFAULT) && ($this->_user->conf->MAIN_LANG_DEFAULT != 'auto')) {
@@ -46,7 +46,7 @@ function __construct($login)
global $langs,$user,$db;

if (!empty($login)) {
if (get_class($db) == get_class($login) || $user->id > 0 || $user->fetch('', $login, '', 1) > 0) {
if ((is_object($login) && get_class($db) == get_class($login)) || $user->id > 0 || $user->fetch('', $login, '', 1) > 0) {
$user->getrights();
$this->_user = $user;
if (isset($user->conf->MAIN_LANG_DEFAULT) && ($user->conf->MAIN_LANG_DEFAULT != 'auto')) {

0 comments on commit a727d96

Please sign in to comment.
You can’t perform that action at this time.