Removed warnings

This commit is contained in:
fbsanchez 2021-02-09 10:25:08 +01:00
parent e711239c69
commit 40e97f6cf6
11 changed files with 63 additions and 87 deletions

View File

@ -80,9 +80,8 @@ if (isset($_GET['loginhash']) === true) {
} else {
include_once 'general/login_page.php';
db_pandora_audit('Logon Failed (loginhash', '', 'system');
while (@ob_end_flush()) {
// Dumping...
continue;
while (ob_get_length() > 0) {
ob_end_flush();
}
exit('</html>');
@ -169,7 +168,6 @@ if ($config['force_instant_logout'] === true) {
}
while (@ob_end_flush()) {
// Dumping...
continue;
while (ob_get_length() > 0) {
ob_end_flush();
}

View File

@ -42,16 +42,7 @@ if (!is_dir($config['homedir'])) {
// Help to debug problems. Override global PHP configuration
global $develop_bypass;
if ($develop_bypass != 1) {
// error_reporting(E_ALL);
if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE);
} else {
error_reporting(E_ALL & ~E_NOTICE);
}
ini_set('display_errors', 0);
} else {
if ((int) $develop_bypass === 1) {
// Develop mode, show all notices and errors on Console (and log it)
if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
error_reporting(E_ALL & ~E_DEPRECATED);
@ -304,7 +295,7 @@ switch ($config['dbtype']) {
// ======================================================================
// Menu display mode.
if ($_SESSION['menu_type']) {
if (isset($_SESSION['meny_type']) === true && $_SESSION['menu_type']) {
$config['menu_type'] = $_SESSION['menu_type'];
} else {
$config['menu_type'] = 'classic';

View File

@ -4463,7 +4463,7 @@ function get_help_info($section_name)
{
global $config;
$user_language = get_user_language($id_user);
$user_language = get_user_language($config['id_user']);
$es = false;
$result = 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:';

View File

@ -12864,7 +12864,7 @@ function reporting_get_stats_servers()
);
$tdata[1] = '<span class="big_data" id="total_events">'.html_print_image('images/spinner.gif', true).'</span>';
if ($system_events > 50000 && !enterprise_installed()) {
if (isset($system_events) && $system_events > 50000 && !enterprise_installed()) {
$tdata[2] = "<div id='monitoreventsmodal' class='publienterprise' title='Community version' style='text-align:left'><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>";
} else {
$tdata[3] = '&nbsp;';

View File

@ -304,6 +304,7 @@ function users_get_groups(
$search=''
) {
static $group_cache = [];
$filter = '';
// Added users_group_cache to avoid unnecessary proccess on massive calls...
static $users_group_cache = [];

View File

@ -103,7 +103,7 @@ class gettext_reader {
* @param object Reader the StreamReader object
* @param boolean enable_cache Enable or disable caching of strings (default on)
*/
function gettext_reader($Reader, $enable_cache = true) {
function __construct($Reader, $enable_cache = true) {
$machine = php_uname("m");
$enabled64Bits = false;

View File

@ -219,7 +219,9 @@ function enable_session_handlers()
{
global $config;
if ($config['_using_pandora_sessionhandlers'] !== true) {
if (isset($config['_using_pandora_sessionhandlers']) !== true
|| $config['_using_pandora_sessionhandlers'] !== true
) {
if (session_status() !== PHP_SESSION_NONE) {
// Close previous version.
session_write_close();

View File

@ -60,7 +60,7 @@ class StringReader {
var $_pos;
var $_str;
function StringReader($str='') {
function __construct($str='') {
$this->_str = $str;
$this->_pos = 0;
//BUGFIX-HR: 2008-07-21 we have to detect, if we need mb_str* functions instead of normal functions !
@ -128,7 +128,7 @@ class FileReader {
var $_fd;
var $_length;
function FileReader($filename) {
function __construct($filename) {
if (file_exists($filename)) {
$this->_length=filesize($filename);
@ -184,8 +184,8 @@ class FileReader {
// Preloads entire file in memory first, then creates a StringReader
// over it (it assumes knowledge of StringReader internals)
class CachedFileReader extends StringReader {
function CachedFileReader($filename) {
parent::StringReader(); //BUGFIX-HR: 2008-07-21 missing parent constructor call
function __construct($filename) {
parent::__construct(); //BUGFIX-HR: 2008-07-21 missing parent constructor call
if (file_exists($filename)) {
$length=filesize($filename);

View File

@ -380,9 +380,8 @@ if (! isset($config['id_user'])) {
'Invalid double auth login: '.$_SERVER['REMOTE_ADDR'],
$_SERVER['REMOTE_ADDR']
);
while (@ob_end_flush()) {
// Dumping...
continue;
while (ob_get_length() > 0) {
ob_end_flush();
}
exit('</html>');
@ -401,9 +400,8 @@ if (! isset($config['id_user'])) {
if (!$saml_user_id) {
$login_failed = true;
include_once 'general/login_page.php';
while (@ob_end_flush()) {
// Dumping...
continue;
while (ob_get_length() > 0) {
ob_end_flush();
}
exit('</html>');
@ -446,9 +444,8 @@ if (! isset($config['id_user'])) {
if ($blocked) {
include_once 'general/login_page.php';
db_pandora_audit('Password expired', 'Password expired: '.$nick, $nick);
while (@ob_end_flush()) {
// Dumping...
continue;
while (ob_get_length() > 0) {
ob_end_flush();
}
exit('</html>');
@ -481,9 +478,8 @@ if (! isset($config['id_user'])) {
'Password expired: '.$nick,
$nick
);
while (@ob_end_flush()) {
// Dumping...
continue;
while (ob_get_length() > 0) {
ob_end_flush();
}
exit('</html>');
@ -505,9 +501,8 @@ if (! isset($config['id_user'])) {
// Load the page to introduce the double auth code.
$login_screen = 'double_auth';
include_once 'general/login_page.php';
while (@ob_end_flush()) {
// Dumping...
continue;
while (ob_get_length() > 0) {
ob_end_flush();
}
exit('</html>');
@ -677,9 +672,8 @@ if (! isset($config['id_user'])) {
'Invalid login: '.$nick,
$nick
);
while (@ob_end_flush()) {
// Dumping...
continue;
while (ob_get_length() > 0) {
ob_end_flush();
}
exit('</html>');
@ -690,9 +684,8 @@ if (! isset($config['id_user'])) {
'Invalid login: '.$nick,
$nick
);
while (@ob_end_flush()) {
// Dumping...
continue;
while (ob_get_length() > 0) {
ob_end_flush();
}
exit('</html>');
@ -741,9 +734,8 @@ if (! isset($config['id_user'])) {
} else {
include_once 'general/login_page.php';
db_pandora_audit('Logon Failed (loginhash', '', 'system');
while (@ob_end_flush()) {
// Dumping...
continue;
while (ob_get_length() > 0) {
ob_end_flush();
}
exit('</html>');
@ -891,9 +883,8 @@ if (! isset($config['id_user'])) {
}
}
while (@ob_end_flush()) {
// Dumping...
continue;
while (ob_get_length() > 0) {
ob_end_flush();
}
exit('</html>');
@ -917,9 +908,8 @@ if (! isset($config['id_user'])) {
} else {
include_once 'general/login_page.php';
db_pandora_audit('Logon Failed (loginhash', '', 'system');
while (@ob_end_flush()) {
// Dumping...
continue;
while (ob_get_length() > 0) {
ob_end_flush();
}
exit('</html>');
@ -941,9 +931,8 @@ if (! isset($config['id_user'])) {
unset($_SESSION['id_usuario']);
unset($iduser);
include_once 'general/login_page.php';
while (@ob_end_flush()) {
// Dumping...
continue;
while (ob_get_length() > 0) {
ob_end_flush();
}
exit('</html>');
@ -960,9 +949,8 @@ if (! isset($config['id_user'])) {
unset($_SESSION['id_usuario']);
unset($iduser);
include_once 'general/login_page.php';
while (@ob_end_flush()) {
// Dumping...
continue;
while (ob_get_length() > 0) {
ob_end_flush();
}
exit('</html>');
@ -995,9 +983,8 @@ if (isset($_GET['bye'])) {
// Process logout.
include 'general/logoff.php';
while (@ob_end_flush()) {
// Dumping...
continue;
while (ob_get_length() > 0) {
ob_end_flush();
}
exit('</html>');
@ -1298,9 +1285,8 @@ if ($config['pure'] == 0) {
require_once 'include/functions_clippy.php';
clippy_start($sec2);
while (@ob_end_flush()) {
// Dumping...
continue;
while (ob_get_length() > 0) {
ob_end_flush();
}
db_print_database_debug();

View File

@ -60,7 +60,6 @@ if ($config['force_instant_logout'] === true) {
}
}
while (@ob_end_flush()) {
// Dumping...
continue;
while (ob_get_length() > 0) {
ob_end_flush();
}

View File

@ -287,9 +287,8 @@ $(document).ready (function () {
<?php
echo '</body>';
while (@ob_end_flush()) {
// Dumping...
continue;
while (ob_get_length() > 0) {
ob_end_flush();
}
echo '</html>';