Skip to content
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

Warning: Undefined variable $page_id #368

Open
Grover-D opened this issue May 19, 2023 · 2 comments
Open

Warning: Undefined variable $page_id #368

Grover-D opened this issue May 19, 2023 · 2 comments

Comments

@Grover-D
Copy link

Webcalendar Version 1.9.1
Apache 2.4.56-1
php-fpm 8.1.12-1
MariaDB 10.4.26-1

Brand new installation. Just in the testing phase right now.

I am using built in WebCalendar authentication.

When accessing webcalendar/user_mgmt.php I get:

Warning: Undefined variable $page_id in /var/www/htdocs/webcalendar-master/includes/access.php on line 452

There are additional messages, but I will address them in other posts.

What/where should $page_id be initialized as/to?

@Grover-D
Copy link
Author

Grover-D commented May 19, 2023

$page_id seems to be local to function access_can_view_page(). I added an initialization statement for$page_id:

function access_can_view_page( $page = '', $user = '' ) {
  global $access_user, $is_admin, $login,
  $page_lookup, $page_lookup_ex, $PHP_SELF;

  $page_id = 0;    // Initialize $page_id
  if( ! access_is_enabled() )

And it is happy.

This also fixed a number of other additional errors that we dependent on $page_id.

@automotorcanarias
Copy link

I had the same issue, It´s work for me, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants