Skip to content
Snippets Groups Projects
Commit 4c7a9495 authored by Prasad's avatar Prasad
Browse files

Merge remote-tracking branch 'upstream/master'

parents 6039f5de 667d0da7
No related branches found
No related tags found
2 merge requests!1233E_ALL fixes across modules for PHP 8.x,!1194Master
......@@ -818,7 +818,7 @@ class PearDatabase{
// Backward compatible mode for adodb library.
if ($this->dbType == 'mysqli') {
mysqli_report(MYSQLI_REPORT_ALL ^ MYSQLI_REPORT_STRICT);
mysqli_report(MYSQLI_REPORT_ALL ^ MYSQLI_REPORT_STRICT ^ MYSQLI_REPORT_INDEX);
}
$this->database = ADONewConnection($this->dbType);
......
......@@ -73,19 +73,6 @@ class Install_Utils_Model {
$directiveValues['max_execution_time'] = ini_get('max_execution_time');
if (ini_get('memory_limit') < 32)
$directiveValues['memory_limit'] = ini_get('memory_limit');
$errorReportingValue = E_WARNING & ~E_NOTICE;
if(version_compare(PHP_VERSION, '5.5.0') >= 0){
$errorReportingValue = E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT;
}
else if(version_compare(PHP_VERSION, '5.3.0') >= 0) {
$errorReportingValue = E_WARNING & ~E_NOTICE & ~E_DEPRECATED;
}
if (ini_get('error_reporting') != $errorReportingValue)
$directiveValues['error_reporting'] = 'NOT RECOMMENDED';
if (ini_get('log_errors') == '1' || stripos(ini_get('log_errors'), 'On') > -1)
$directiveValues['log_errors'] = 'On';
if (ini_get('short_open_tag') == '1' || stripos(ini_get('short_open_tag'), 'On') > -1)
$directiveValues['short_open_tag'] = 'On';
return $directiveValues;
}
......@@ -101,10 +88,7 @@ class Install_Utils_Model {
'register_globals' => 'On',
'output_buffering' => 'On',
'max_execution_time' => '0',
'memory_limit' => '32',
'error_reporting' => 'E_WARNING & ~E_NOTICE',
'log_errors' => 'Off',
'short_open_tag' => 'Off'
'memory_limit' => '32'
);
/**
......@@ -112,12 +96,6 @@ class Install_Utils_Model {
* @return type
*/
public static function getRecommendedDirectives(){
if(version_compare(PHP_VERSION, '5.5.0') >= 0){
self::$recommendedDirectives['error_reporting'] = 'E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT';
}
else if(version_compare(PHP_VERSION, '5.3.0') >= 0) {
self::$recommendedDirectives['error_reporting'] = 'E_WARNING & ~E_NOTICE & ~E_DEPRECATED';
}
return self::$recommendedDirectives;
}
......@@ -380,7 +358,7 @@ class Install_Utils_Model {
if($db_type) {
// Backward compatible mode for adodb library.
if ($db_type == 'mysqli') {
mysqli_report(MYSQLI_REPORT_ALL ^ MYSQLI_REPORT_STRICT);
mysqli_report(MYSQLI_REPORT_ALL ^ MYSQLI_REPORT_STRICT ^ MYSQLI_REPORT_INDEX);
}
$conn = NewADOConnection($db_type);
......
......@@ -30,7 +30,7 @@ class Install_Index_view extends Vtiger_View_Controller {
protected function applyInstallFriendlyEnv() {
// config.inc.php - will not be ready to control this yet.
version_compare(PHP_VERSION, '5.5.0') <= 0 ? error_reporting(E_ERROR & ~E_NOTICE & ~E_DEPRECATED) : error_reporting(E_ERROR & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT); // Production
version_compare(PHP_VERSION, '7.0.0') >= 0 ? error_reporting(E_WARNING & ~E_NOTICE) : error_reporting(E_WARNING & ~E_NOTICE & ~E_DEPRECATED & E_ERROR & ~E_STRICT); // Debug
//version_compare(PHP_VERSION, '7.0.0') >= 0 ? error_reporting(E_WARNING & ~E_NOTICE) : error_reporting(E_WARNING & ~E_NOTICE & ~E_DEPRECATED & E_ERROR & ~E_STRICT); // Debug
set_time_limit(0); // override limits on execution time to allow install to finish
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment