Blank app error under PHP 8.x

VictorUlloa, Wed Aug 14 2024, 11:46PM

I created a blank app that fails under PHP 8.x with message


(error 8192 in line [ 31 of file [ c:\phspeedv33\xampp\htdocs\alimentos\_libs\sec_backup_lan.php ])
runtime error: [ setcookie(): passing null to parameter #2 ($value) of type string is deprecated ]

I don't know if this is related, but I found that the others apps main PHP module declare a

global $language;

But this declaration is not in the blank app main PHP.

Under PHP 7.4 the app runs ok, because obviously it still can use a null string in the setcookie parameter.

Regards
Re: Blank app error under PHP 8.x
administrator, Thu Aug 15 2024, 12:45PM

This looks like a bug. It is a strange one, as we have many blanks running in our web services layer. But reported as bug.
Re: Blank app error under PHP 8.x
administrator, Thu Aug 15 2024, 05:33PM

Fixed.
Re: Blank app error under PHP 8.x
VictorUlloa, Wed Aug 28 2024, 03:40PM

Hi, the error persists in 3.5 when using PHP 8.3, not tested in other 8.x version, runs ok under PHP 7.4

Steps to reproduce:
- Create a new project
- Create a new blank app
- Run it, no problem
- Enable multilingual translation, synchronize and generate language files
- Generate the app, re-run blank app:

(Error 8192 in line [31] of file [ C:\PHsPeedV35\xampp\htdocs\learnprocess\_libs\learn_blank_lan.php]) 2024-08-28 15:33:19 |Runtime error: [ setcookie(): Passing null to parameter #2 ($value) of type string is deprecated ]
Re: Blank app error under PHP 8.x
administrator, Wed Aug 28 2024, 04:48PM

The issue is caused by the blank application being run without a language specifier. A blank application does not have a default language, but expect the definition in the url. To 'fix' the issue, open the 'set runtime parameters'. (third button in the red toolbar) Add the language variable to the correct module and set the value to en or es, or other language prefix you use. Set type to get. Now when you run the application, the get parameter is automatically passed to the application. If you have a blank application that requires post parameters then set the value to post. In that case, the application will start with a menu to enter the value for language.
We fixed an issue on this matter that was not related to the above. But we will consider to implement the default value for the language

Re: Blank app error under PHP 8.x
administrator, Wed Aug 28 2024, 07:16PM

We have upgraded PHsPeedIDE.exe, which takes care of the problem. If no language parameter is given, it will provide the default. If there is no default, then the application will still fail, but that's obvious wink

To install, run the config utility. Go to incremental updates, and the update should be visible.

Re: Blank app error under PHP 8.x
VictorUlloa, Thu Aug 29 2024, 10:44AM

Thank you very much, solution confirmed!