Mon. - Fri. 9 am - 5 pm Support Policy
Remember me

Undefined Variable in 2.3

5 months 2 weeks ago #1

  • Harlow's Avatar
  • Harlow
  • Posts: 14
Just installed 2.3.0 over 2.2.4 and now get this message at the top of my Joomla 3.9.1

Notice: Undefined variable: currentPage in components/com_bagallery/helpers/bagallery.php on line 1475

How can this be fixed?

5 months 2 weeks ago #2

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 6298
Thank you for contacting us

Send us a link to page with problem.
Send us FTP access and Joomla admin access via our contact form.


5 months 2 weeks ago #3

  • Harlow's Avatar
  • Harlow
  • Posts: 14
I am not allowed to provide remote FTP or remote administrative access to the site.

The "Notice", which presents directly as described, presents on any page with a BAGallery.

The variable currentPage is undefined in file bagallery.php. How and where should I define it?

5 months 2 weeks ago #4

  • Harlow's Avatar
  • Harlow
  • Posts: 14
I see this in the PHP manual:

"Relying on the default value of an uninitialized variable is problematic in the case of including one file into another which uses the same variable name. It is also a major security risk with register_globals turned on. E_NOTICE level error is issued in case of working with uninitialized variables, however not in the case of appending elements to the uninitialized array. isset() language construct can be used to detect if a variable has been already initialized. Additionally and more ideal is the solution of empty() since it does not generate a warning or error message if the variable is not initialized."

So I guess I just have to declare and initialize it to get the notice to stop?

5 months 2 weeks ago #5

  • Artem's Avatar
  • Artem
  • Posts: 8221
The Gallery installation package was updated - issue fixed!

Update Gallery manually:
1. Login to your profile on and download extension instalation package
2. From the backend of your Joomla site (administration) select Extensions >> Install/Uninstall.
3. Click the Browse button and select the extension package on your local machine.
4. Click the Upload File & Install button.
5. Clear your Joomla and Browser cache.

Many thanks,

5 months 2 weeks ago #6

  • Harlow's Avatar
  • Harlow
  • Posts: 14
That fixed it. Thank you very much.
Powered by Kunena Forum