Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Error with PHP8 and newest CPG 1.6.12 entering the Configuration Admin menu  (Read 5312 times)

0 Members and 1 Guest are viewing this topic.

viajero

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 18
  • Webmaster and Traveller
    • Der Reisende unterwegs

good morning,

steps i have done:
1. upgraded via normal update from 1.5.xx to cpg 1.6.12
went through successfully
2. checked all versions via update database & version check
everything was OK

gallery is showing correctly
login into admin panel works
try to enter into "config" / Einstellungen --> the following shows up under PHP8

Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in PfadzurGallerie/galerie/include/functions.inc.php:5871 Stack trace: #0 PfadzurGallerie/galerie/include/admin.inc.php(174): cpg_get_available_languages() #1 PfadzurGallerie/galerie/admin.php(61): require_once('/PfadzurGallerie/...') #2 {main} thrown in PfadzurGallerie/galerie/include/functions.inc.php on line 5871

i can set the PHP settings from my provider forward and backwards - it works fine with PHP 7.3 / 7.4
when i set it to use PHP8 ( 8.01 ) according to phpinfo then entering there is giving me this mistake

every other admin menu entry works fine
it seems to be a change / or validation issue with php and its used variable types

thx in advance
more details / logs can be provided if necessary

André
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026

Thanks for the feedback.

That error should not be occurring at all if your language settings are configured okay ... so check that (some) languages are available and enabled.

That said ... if you can update your PHP 8 version to greater than 8.0.1 (8.0.7), that should also rid you of the error.
As a last-ditch solution, changing the offending line (include/functions.inc.php:5871) should correct the problem.

Code: [Select]
        if (empty($language_array)) {
Logged

viajero

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 18
  • Webmaster and Traveller
    • Der Reisende unterwegs

Hi,

Thx for the hint,
so how do I know, that my language settings are OK ?
which settings in which database table i have to look for / files in the directory ?
it is strange, that it comes up only with certain php versions
and - i cannot install any newer php version as this is a shared webspace - but i can hassle my provider to do it

thx in advance

André
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.