Skip to content

Commit

Permalink
Merge pull request #26 from MightyMCoder/develop
Browse files Browse the repository at this point in the history
bugfix: Attempt to read property "config" on null when check for update without admin account
  • Loading branch information
MightyMCoder authored Jan 5, 2025
2 parents aec1b36 + 25874f7 commit 8afe98f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions preferences/preferences_check_for_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,19 @@
*/
require_once(__DIR__ . '/../../../adm_program/system/common.php');
require_once(__DIR__ . '/../common_function.php');
require_once(__DIR__ . '/../classes/configtable.php');

// Access only with valid login
require_once(__DIR__ . '/../../../adm_program/system/login_valid.php');

// Initialize and check the parameters
$getMode = admFuncVariableIsValid($_GET, 'mode', 'int', array('defaultValue' => 1, 'directOutput' => true));
$PIMVersion = admFuncVariableIsValid($_GET, 'PIMVersion', 'string', array('defaultValue' => "n/a", 'directOutput' => true));
$PIMBetaVersion = admFuncVariableIsValid($_GET, 'PIMBetaVersion', 'string', array('defaultValue' => "n/a", 'directOutput' => true));

$pPreferences = new CConfigTablePIM();
$pPreferences->read();

// only authorized user are allowed to start this module
if (!isUserAuthorizedForPreferences()) {
$gMessage->show($gL10n->get('SYS_NO_RIGHTS'));
Expand Down

0 comments on commit 8afe98f

Please sign in to comment.