phpBB Gallery

Error in a PCA file and lang file - phpBB Gallery

Error in a PCA file and lang file

by sylver35 » Thu Jan 18, 2018 1:50 pm

Hello,

In the fist administration page of extension, a warning:
[phpBB Debug] PHP Warning: in file [ROOT]/ext/phpbbgallery/core/acp/main_module.php on line 520: A non-numeric value encountered
File core/acp/main_module.php line 520:

Code: Select all

		$images_per_day = sprintf('%.2f', $config['num_images'] / $boarddays);
Replace width:

Code: Select all

		$images_per_day = sprintf('%.2f', $config['phpbb_gallery_num_images'] / $boarddays);
[phpBB Debug] PHP Notice: in file [ROOT]/ext/phpbbgallery/core/language/fr/gallery_acp.php on line 128: Undefined variable: phpEx
[phpBB Debug] PHP Notice: in file [ROOT]/ext/phpbbgallery/core/language/fr/gallery_acp.php on line 130: Undefined variable: phpEx
[phpBB Debug] PHP Notice: in file [ROOT]/ext/phpbbgallery/core/language/fr/gallery_acp.php on line 131: Undefined variable: phpEx
[phpBB Debug] PHP Notice: in file [ROOT]/ext/phpbbgallery/core/language/fr/gallery_acp.php on line 166: Undefined variable: phpEx
Error in core/language/*lang*/gallery_acp.php
Add:

Code: Select all

global $phpEx;
Before:

Code: Select all

$lang = array_merge($lang, array(
Hello world !
User avatar
sylver35
Registered User
Posts: 148
Joined: Sat Feb 23, 2008 2:38 pm
Location: France / Bretagne
Name: Philippe
Contact:

Re: Error in a PCA file and lang file

by Satanasov » Thu Jan 18, 2018 2:24 pm

Could you provide some more info - PHP version, phpBB version
For list of all my extensions go to https://github.com/satanasov
If you want custom functions in some of my products - PM me and we will discuss it.
Satanasov
Registered User
Posts: 1082
Joined: Sun Jul 29, 2012 5:48 am
Name: Stanislav Atanasov
Contact:

Re: Error in a PCA file and lang file

by sylver35 » Thu Jan 18, 2018 8:55 pm

That's not my version of phpBB or php who are in question.
Just i work with debug active
@define('DEBUG', true);
@define('EXTRA_DEBUG', true);
do that in your config.php and see... 8-)

the first:

Code: Select all

		$images_per_day = sprintf('%.2f', $config['num_images'] / $boarddays);
is bad because you have phpbb_gallery_num_images in the config table, not num_images
And for the second, never use $phpEx in a language file if you don't write before the global $phpEx
Hello world !
User avatar
sylver35
Registered User
Posts: 148
Joined: Sat Feb 23, 2008 2:38 pm
Location: France / Bretagne
Name: Philippe
Contact:

Re: Error in a PCA file and lang file

by Satanasov » Thu Jan 18, 2018 9:48 pm

I'm pretty sure I fixed that num images... I know I have... but there is so much muck going with my machines lately, that it's possible I have reverted it or never pushed it.

As for the languages... I always just copy other files.
For list of all my extensions go to https://github.com/satanasov
If you want custom functions in some of my products - PM me and we will discuss it.
Satanasov
Registered User
Posts: 1082
Joined: Sun Jul 29, 2012 5:48 am
Name: Stanislav Atanasov
Contact:

Re: Error in a PCA file and lang file

by sylver35 » Thu Jan 18, 2018 10:18 pm

No problem, it's because i work on phpBB all the time with the extra debug :mrgreen:

You don't have gallery html files for phpBB 3.2.2 ?
Hello world !
User avatar
sylver35
Registered User
Posts: 148
Joined: Sat Feb 23, 2008 2:38 pm
Location: France / Bretagne
Name: Philippe
Contact:

Re: Error in a PCA file and lang file

by 3Di » Fri Jan 19, 2018 12:40 am

sylver35 wrote:No problem, it's because i work on phpBB all the time with the extra debug :mrgreen:

You don't have gallery html files for phpBB 3.2.2 ?
The problem is your French language files :geek:
language/fr/gallery_acp.php on line 128: Undefined variable: phpEx
sylver35 wrote: And for the second, never use $phpEx in a language file if you don't write before the global $phpEx
I have never seen a such stuff, again, check your FR package ;) As for globalize $phpEx there: absurd, I can say. :)

About the rest (numeric value error), are you using PHP 7.2 ? If yes, that could be your answer.
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
3Di
Registered User
Posts: 12118
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT), Frankfurt (DE)
Name: Marco
Contact:

Re: Error in a PCA file and lang file

by sylver35 » Fri Jan 19, 2018 11:35 am

The problem is your French language files
So you're sure of what you're saying ?

Code: Select all

[phpBB Debug] PHP Notice: in file [ROOT]/ext/phpbbgallery/core/language/en/gallery_acp.php on line 128: Undefined variable: phpEx
[phpBB Debug] PHP Notice: in file [ROOT]/ext/phpbbgallery/core/language/en/gallery_acp.php on line 130: Undefined variable: phpEx
[phpBB Debug] PHP Notice: in file [ROOT]/ext/phpbbgallery/core/language/en/gallery_acp.php on line 131: Undefined variable: phpEx
[phpBB Debug] PHP Notice: in file [ROOT]/ext/phpbbgallery/core/language/en/gallery_acp.php on line 166: Undefined variable: phpEx
Well gosh, it looks like all languages is corrupted !!
No ! turn on the debug and see....
About the rest (numeric value error), are you using PHP 7.2 ? If yes, that could be your answer
No, 7.1.9
is bad because you have phpbb_gallery_num_images in the config table, not num_images
Hello world !
User avatar
sylver35
Registered User
Posts: 148
Joined: Sat Feb 23, 2008 2:38 pm
Location: France / Bretagne
Name: Philippe
Contact:

Re: Error in a PCA file and lang file

by cpg-at-work » Fri Jan 19, 2018 6:44 pm

Hallo,

in my version 1.21 from github it is ok:

Code: Select all

$images_per_day = sprintf('%.2f', $config['phpbb_gallery_num_images'] / $boarddays);
Best regards
cpg
cpg-at-work
Registered User
Posts: 47
Joined: Sat Sep 22, 2012 6:38 pm
Location: Germany
Contact:

Re: Error in a PCA file and lang file

by sylver35 » Sat Jan 20, 2018 5:38 pm

I know where is the problem
I have instaled the gallery with upload extension, and the wrong version is here.

All work fine in the github version :-)
Hello world !
User avatar
sylver35
Registered User
Posts: 148
Joined: Sat Feb 23, 2008 2:38 pm
Location: France / Bretagne
Name: Philippe
Contact: