mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
Fixed PHP 7.3 warnings
- FIX: Silenced compact() in e107Test::testInitCore() - FIX: Null check in e_db_pdo::makeTableDef() - FIX: Null check in e_db_mysql::makeTableDef() - FIX: userlogin::login() had this warning on line 148: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
This commit is contained in:
parent
4454b01588
commit
be8f2bbeb6
@ -2718,7 +2718,8 @@ class e_db_pdo implements e_db
|
||||
$dbAdm = new db_table_admin();
|
||||
|
||||
$baseStruct = $dbAdm->get_current_table($tableName);
|
||||
$fieldDefs = $dbAdm->parse_field_defs($baseStruct[0][2]); // Required definitions
|
||||
$baseStruct = isset($baseStruct[0][2]) ? $baseStruct[0][2] : null;
|
||||
$fieldDefs = $dbAdm->parse_field_defs($baseStruct); // Required definitions
|
||||
if (!$fieldDefs) return false;
|
||||
|
||||
$outDefs = array();
|
||||
|
@ -145,7 +145,7 @@ class userlogin
|
||||
$authorized = true;
|
||||
break;
|
||||
case LOGIN_TRY_OTHER:
|
||||
continue;
|
||||
continue 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3157,7 +3157,8 @@ class e_db_mysql implements e_db
|
||||
$dbAdm = new db_table_admin();
|
||||
|
||||
$baseStruct = $dbAdm->get_current_table($tableName);
|
||||
$fieldDefs = $dbAdm->parse_field_defs($baseStruct[0][2]); // Required definitions
|
||||
$baseStruct = isset($baseStruct[0][2]) ? $baseStruct[0][2] : null;
|
||||
$fieldDefs = $dbAdm->parse_field_defs($baseStruct); // Required definitions
|
||||
if (!$fieldDefs) return false;
|
||||
|
||||
$outDefs = array();
|
||||
|
@ -41,8 +41,8 @@ class e107Test extends \Codeception\Test\Unit
|
||||
//$res = null;
|
||||
include_once(APP_PATH.'/e107_config.php'); // contains $E107_CONFIG = array('site_path' => '000000test');
|
||||
|
||||
$e107_paths = compact('ADMIN_DIRECTORY', 'FILES_DIRECTORY', 'IMAGES_DIRECTORY', 'THEMES_DIRECTORY', 'PLUGINS_DIRECTORY', 'HANDLERS_DIRECTORY', 'LANGUAGES_DIRECTORY', 'HELP_DIRECTORY', 'DOWNLOADS_DIRECTORY','UPLOADS_DIRECTORY','SYSTEM_DIRECTORY', 'MEDIA_DIRECTORY','CACHE_DIRECTORY','LOGS_DIRECTORY', 'CORE_DIRECTORY', 'WEB_DIRECTORY');
|
||||
$sql_info = compact('mySQLserver', 'mySQLuser', 'mySQLpassword', 'mySQLdefaultdb', 'mySQLprefix', 'mySQLport');
|
||||
$e107_paths = @compact('ADMIN_DIRECTORY', 'FILES_DIRECTORY', 'IMAGES_DIRECTORY', 'THEMES_DIRECTORY', 'PLUGINS_DIRECTORY', 'HANDLERS_DIRECTORY', 'LANGUAGES_DIRECTORY', 'HELP_DIRECTORY', 'DOWNLOADS_DIRECTORY','UPLOADS_DIRECTORY','SYSTEM_DIRECTORY', 'MEDIA_DIRECTORY','CACHE_DIRECTORY','LOGS_DIRECTORY', 'CORE_DIRECTORY', 'WEB_DIRECTORY');
|
||||
$sql_info = @compact('mySQLserver', 'mySQLuser', 'mySQLpassword', 'mySQLdefaultdb', 'mySQLprefix', 'mySQLport');
|
||||
$res = $this->e107->initCore($e107_paths, e_ROOT, $sql_info, varset($E107_CONFIG, array()));
|
||||
|
||||
$this->assertEquals('000000test', $res->site_path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user