-
Notifications
You must be signed in to change notification settings - Fork 3
Bug fixing php7 #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Bug fixing php7 #28
Conversation
Gesundheitsminister
commented
Nov 30, 2017
- wrong mysqli links
- sql error on page copy
- session fix
Bringing fork up to date
* fixed sql error in fnc.con -> con_create_site_meta_from_idcatside
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your bugfixes. I have some comments and questions before merging this PR.
@@ -356,7 +356,7 @@ function get_parent_directories($iddirectory, $idclient) { | |||
// -> else: only $file is used as ID | |||
// | |||
function get_file($file, $idclient = '', $iddirectory = '', $type = 1) { | |||
if (empty($file)) return ''; // missing fileid | |||
if (empty($file)) return array(); // missing fileid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you use array()
instead of []
in this file (2 times)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to be compatible to php < 5.4. I dont know if this still makes sense.
@@ -730,15 +730,15 @@ function con_create_site_meta_from_idcatside($idclient, $idlang_current, $idcats | |||
//create idside | |||
$sql = "INSERT INTO ".$cms_db['side']." (idclient) VALUES ('$idclient')"; | |||
$db->query($sql); | |||
$idside_to = mysqli_insert_id($this->db->Link_ID); | |||
$idside_to = mysqli_insert_id($GLOBALS['db']->Link_ID); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not using $db->Link_ID
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->db is not set in this function. $GLOBALS['db'] is reliable.
@@ -938,7 +938,7 @@ function insert_cssrelation( $idcss, $idcssfile ) { | |||
$sql = 'INSERT INTO ' . $cms_db['css_upl'] . ' (idcss, idupl) VALUES '; | |||
$sql .= '(' . $idcss . ', ' . $idcssfile . ')'; | |||
$db->query($sql); | |||
return mysqli_insert_id($this->db->Link_ID); | |||
return mysqli_insert_id($GLOBALS['db']->Link_ID); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here: Why not using $db->Link_ID
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same problem. $this->db is not accessible everywhere.
backend/inc/inc.mod_config.php
Outdated
@@ -80,6 +80,7 @@ | |||
mip_forms_ob_start(); | |||
eval(' ?>' . $default); | |||
$default_arr = mip_forms_get_array(); | |||
//$cms_mod = empty($cms_mod) ? : $cms_mod; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have removed it. Comes with the next update.
@@ -172,6 +172,9 @@ function mip_forms_abstrakt($in, $input) | |||
$spaces .= sprintf($mip_forms_tab['tab'], ' '); | |||
} | |||
|
|||
$mip_forms_tab['left_width'] = empty($mip_forms_tab['left_width']) ? 0 : $mip_forms_tab['left_width']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this part do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is important that $mip_forms_tab['left_width'] is initialised with an integer. PHP7 will miscalculate otherwise.
for some configurations.
for some configurations.
…it produces more problems than it solved * CHANGE: Removed Session fallback in local.php. Prevents showing session ids in Search engines.