Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

PHP8 causes errors on loading the main form

Questions related to using nuBuilder Forte.
potap
Posts: 28
Joined: Wed Nov 23, 2022 1:07 pm
Has thanked: 6 times
Been thanked: 1 time

PHP8 causes errors on loading the main form

Unread post 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.
kev1n
nuBuilder Team
Posts: 4296
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: PHP8 causes errors on loading the main form

Unread post by kev1n »

Hi,

What's your exact PHP version?
potap
Posts: 28
Joined: Wed Nov 23, 2022 1:07 pm
Has thanked: 6 times
Been thanked: 1 time

Re: PHP8 causes errors on loading the main form

Unread post by potap »

kev1n wrote: Wed Dec 07, 2022 1:07 pm Hi,

What's your exact PHP version?
PHP 8.1.12
kev1n
nuBuilder Team
Posts: 4296
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: PHP8 causes errors on loading the main form

Unread post 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]
potap
Posts: 28
Joined: Wed Nov 23, 2022 1:07 pm
Has thanked: 6 times
Been thanked: 1 time

Re: PHP8 causes errors on loading the main form

Unread post 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
kev1n
nuBuilder Team
Posts: 4296
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: PHP8 causes errors on loading the main form

Unread post by kev1n »

I removed the lines that are not relevant.

[File removed: Fixed are on Github]
potap
Posts: 28
Joined: Wed Nov 23, 2022 1:07 pm
Has thanked: 6 times
Been thanked: 1 time

Re: PHP8 causes errors on loading the main form

Unread post 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
*******************************
kev1n
nuBuilder Team
Posts: 4296
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: PHP8 causes errors on loading the main form

Unread post by kev1n »

Further fixes:
core.zip
You do not have the required permissions to view the files attached to this post.
potap
Posts: 28
Joined: Wed Nov 23, 2022 1:07 pm
Has thanked: 6 times
Been thanked: 1 time

Re: PHP8 causes errors on loading the main form

Unread post 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 = '
*********************
potap
Posts: 28
Joined: Wed Nov 23, 2022 1:07 pm
Has thanked: 6 times
Been thanked: 1 time

Re: PHP8 causes errors on loading the main form

Unread post 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
Post Reply