Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Error in langmgr.php on line 318 on php 8.x  (Read 4804 times)

0 Members and 1 Guest are viewing this topic.

Asio Otus

  • Coppermine newbie
  • Country: ru
  • Offline Offline
  • Gender: Female
  • Posts: 9
Error in langmgr.php on line 318 on php 8.x
« on: May 06, 2022, 02:41:01 pm »

Error in langmgr.php on line 318 on php 8.x

Hello.
I updated the gallery version to 1.6.19, if the version of the php server is 8.x, then the language cannot be changed, if you lower the version to 7.4, then there are no problems with choosing the language.

There is an error in the Language Manager if the php server version is 8.x


Quote
Fatal error: Uncaught TypeError: fclose(): Argument #1 ($stream) must be of type resource, bool given in ***/gallery/langmgr.php:318 Stack trace: #0 ***/gallery/langmgr.php(318): fclose(false) #1 {main} thrown in ***/gallery/langmgr.php on line 318
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Error in langmgr.php on line 318 on php 8.x
« Reply #1 on: May 10, 2022, 12:22:55 am »

Can not reproduce the error. What exact version of PHP causes the error for you.
Logged

Asio Otus

  • Coppermine newbie
  • Country: ru
  • Offline Offline
  • Gender: Female
  • Posts: 9
Re: Error in langmgr.php on line 318 on php 8.x
« Reply #2 on: May 11, 2022, 07:59:42 am »

Can not reproduce the error. What exact version of PHP causes the error for you.

PHP Version 8.0.17, if I lower the version to 7.4.29, then there is no such error
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Error in langmgr.php on line 318 on php 8.x
« Reply #3 on: May 12, 2022, 02:27:21 pm »

Using PHP 8.0.18, I have seen no error.  A normally configured PHP version should not generate an error on that line.  Perhaps there is a configuration issue with your version of PHP.  Or perhaps it is a bug in PHP 8.0.17 (but fixed in 8.0.18).

If you need some solution for your particular situation, you can try replacing line 318 in langmgr.php with:
Code: [Select]
if ($handle) @fclose($handle);
« Last Edit: May 12, 2022, 02:41:03 pm by ron4mac »
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 19 queries.