Page 1 of 2

PHP8 causes errors on loading the main form

Posted: Wed Dec 07, 2022 1:05 pm
by potap
I tried to install nuBuilder (nuBuilder Forte 4.5
DB Version: V.4.5-2022.10.28.00
Files Version: V.4.5-2022.11.07.01
(V.MajorVersion-CurrentDate.BuildNumber)

with PHP8 and getting the following errors instead of the main form:
*****************************
Uncaught Error.

Deprecated: addslashes(): Passing null to parameter #1 ($string) of type string is deprecated in C:\Server\data\htdocs\nuBuilder4\core\nucommon.php on line 316

Deprecated: addslashes(): Passing null to parameter #1 ($string) of type string is deprecated in C:\Server\data\htdocs\nuBuilder4\core\nucommon.php on line 317

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in C:\Server\data\htdocs\nuBuilder4\core\nucommon.php on line 653

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in C:\Server\data\htdocs\nuBuilder4\core\nucommon.php on line 653

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in C:\Server\data\htdocs\nuBuilder4\core\nucommon.php on line 653

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in C:\Server\data\htdocs\nuBuilder4\core\nucommon.php on line 653

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in C:\Server\data\htdocs\nuBuilder4\core\nucommon.php on line 653

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in C:\Server\data\htdocs\nuBuilder4\core\nucommon.php on line 653

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in C:\Server\data\htdocs\nuBuilder4\core\nucommon.php on line 622

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in C:\Server\data\htdocs\nuBuilder4\core\nucommon.php on line 622

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in C:\Server\data\htdocs\nuBuilder4\core\nucommon.php on line 622

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in C:\Server\data\htdocs\nuBuilder4\core\nucommon.php on line 622
*******************

Tried with PHP7 and it works fine.

Re: PHP8 causes errors on loading the main form

Posted: Wed Dec 07, 2022 1:07 pm
by kev1n
Hi,

What's your exact PHP version?

Re: PHP8 causes errors on loading the main form

Posted: Wed Dec 07, 2022 1:20 pm
by potap
kev1n wrote: Wed Dec 07, 2022 1:07 pm Hi,

What's your exact PHP version?
PHP 8.1.12

Re: PHP8 causes errors on loading the main form

Posted: Wed Dec 07, 2022 1:41 pm
by kev1n
I attempted to fix those issues. Unpack the attack file and overwrite the existing one in the /core folder.
Let me know if you encounter other issues.

[File removed: Fixed are on Github]

Re: PHP8 causes errors on loading the main form

Posted: Wed Dec 07, 2022 1:55 pm
by potap
kev1n wrote: Wed Dec 07, 2022 1:41 pm I attempted to fix those issues. Unpack the attack file and overwrite the existing one in the /core folder.
Let me know if you encounter other issues.
It has solved some errors. Maybe it was my mistake, I didn't show the full error text due to character number limit. Now it shows (also too big):

********************
Uncaught Error.
Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in C:\Server\data\htdocs\nuBuilder4\core\nucommon.php on line 1392

Re: PHP8 causes errors on loading the main form

Posted: Wed Dec 07, 2022 2:14 pm
by kev1n
I removed the lines that are not relevant.

[File removed: Fixed are on Github]

Re: PHP8 causes errors on loading the main form

Posted: Wed Dec 07, 2022 2:25 pm
by potap
kev1n wrote: Wed Dec 07, 2022 2:14 pm I removed the lines that are not relevant.

Fix is attached.
When I enter the main screen I stll get

*****************************
Uncaught Error.


Deprecated: addslashes(): Passing null to parameter #1 ($string) of type string is deprecated in C:\Server\data\htdocs\nuBuilder4\core\nucommon.php on line 252

Deprecated: addslashes(): Passing null to parameter #1 ($string) of type string is deprecated in C:\Server\data\htdocs\nuBuilder4\core\nucommon.php on line 253

*********************

Also, when I manage to reload and get thru, I still get (adds nuform.php to errors):

**********************************
Warning: Attempt to read property "sph_php" on bool in C:\Server\data\htdocs\nuBuilder4\core\nucommon.php on line 1392


Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in C:\Server\data\htdocs\nuBuilder4\core\nuform.php on line 1145
*******************************

Re: PHP8 causes errors on loading the main form

Posted: Wed Dec 07, 2022 2:34 pm
by kev1n
Further fixes:
core.zip

Re: PHP8 causes errors on loading the main form

Posted: Wed Dec 07, 2022 6:05 pm
by potap
Thanx, but errors still appear.

*********
Warning: Undefined variable $r in C:\Server\data\htdocs\nuBuilder4\core\nucommon.php on line 1396
{"id":"nuuserhome","form_code":"nuuserhome","form_description":"\u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u044d\u043a\u0440\u0430\u043d","form_type":"launch","browse_title_multiline":"0","browse_autoresize_columns":null,"mobile_view":null,"table":"","primary_key":"","redirect_form_id":"nuuserhome","redirect_other_form_id":"","order":false,"where":"WHERE 0","from":"FROM zzzzsys_setup","javascript":"$('#run_vlnt').removeClass('nuButton').css({'background-color':'red';'color':'white'});\n\nfunction openNuObject() {\n\n $('#nuMessageDiv').remove();\n nuPopup('nuobject', '-1', window.nuFORM.getCurrent().form_id);\n\n}\n\nif (nuSERVERRESPONSE.objects.length === 0 && window.global_access) {\n\n var headings = '
*********************

Re: PHP8 causes errors on loading the main form

Posted: Wed Dec 07, 2022 6:07 pm
by potap
Deprecated: addslashes(): Passing null to parameter #1 ($string) of type string is deprecated in C:\Server\data\htdocs\nuBuilder4\core\nucommon.php on line 277

Warning: Undefined variable $r in C:\Server\data\htdocs\nuBuilder4\core\nucommon.php on line 1396

Warning: Undefined variable $r in C:\Server\data\htdocs\nuBuilder4\core\nucommon.php on line 1396

Warning: Undefined variable $r in C:\Server\data\htdocs\nuBuilder4\core\nucommon.php on line 1396