error: 0 Unsupported operand types: int - string - Forum | JoomShaper
Staff replied General

error: 0 Unsupported operand types: int - string

Asked by Seppe 3 years ago Last activity 2 years ago

Good afternoon

After transferring a website from the old server to the new server, I get this error:
"0 Unsupported operand types: int - string"

Old server: PHP 7.4
new server: PHP 8.1
Joomla versio: 4.3.4
Helix ultimate framework: 2.0.15
PageBuilder Pro: 5.0.9

The frontend gives above named error.
The backend I can visit.

If I turn on the debugmode: I get a lot of errors about PageBuilder

11 replies

Seppe Asked this

I tried to put the website offline, so we can work on this in the background... but I still get the same error

Ofi Khan Staff

Hello Seppe

Apology for the inconvenience. Please share your administrator access here to check the issue. Use the Hidden Content box to share the credentials. Make sure that you have a full site backup with you before sharing.

Best regards

Seppe Asked this

Good morning
seems like there is a problem with the "theme".
Although I thought everything worked perfectly of PHP8.1
When we switch back the PHP version tot 7.4 everything works.
In the opening topic, there was a screenshot with all the errors.
Mostly it was SPPB

Ofi Khan Staff

Please share the issue page link where you see it. I will check it.

Seppe Asked this

Good evening Ofi
As I said before, I changed my settings back to PHP7.4.
When I put them to 8.1 I get the error.
The screenshot of the error is in the first topic

Ofi Khan Staff

Please take a full site backup with Akeeba Backup in ZIP format and share here. Follow this tutorial. I will check it on PHP 8.1 on my end.

Seppe Asked this

If I follow this, then it looks like it is just a copy of the website, installed again in a subdirectory.
correct?

If so, I will transfer the website to another domain, because the server now is running PHP7.4 to keep the website working.
when I put the copy of the website in a subdomain, it will not be on PHP8.1
I created a super-user account for you, then you can test it on a PHP8.1 server if that is ok.
Be keep in mind that the backend will work, the frontend doesnt.

Ofi Khan Staff

Yes, then run it on PHP 8.1 and share that access. I will check the issue.

Petr Chudoba

Hello guys,

I am running on PHP 8.1 with SPPB 3.8. without troubles. I updated SPPB to 5.0 and have the same issue. I had the issue in productive enviroment, where I restored the backup and also have it now in XAMPP on my local pc.

TypeError: Unsupported operand types: string + int in C:\xampp_8_1_17\htdocs\joomla\zkp23_10_22\templates\flex\sppagebuilder\addons\tab\site.php:135

$output .= '<a data-toggle="sppb-tab" id="sppb-content-'. ($this->addon->id + $key) .'" class="'.($style == 'custom' ? $nav_text_align : '').' '.$icon_block.'" href="#sppb-tab-'. ($this->addon->id + $key) .'" role="tab" aria-controls="sppb-tab-'. ($this->addon->id + $key) .'" aria-selected="'. ( ($key==0) ? "true" : "false").'">'. $image_top . $image_left . $icon_top . $icon_left . $title . $image_right . $image_bottom . $icon_right . $icon_bottom . $subtitle .'</a>';

The variable &key is empty. If I set in debugger $key=1 for my 1st page with the Tab, then it works. If I set $key=2 in other page, it works too.

The only one possible solution is delete the Tab object from the page and add it as clear new object. I tried it with new tab and it works.

Seppe Asked this

Good morning

4 months later.... still no solution

In the meantime... I updated the versions of Joomla and all add-ons.
I still get the same error.
I tried to transfer the website to a different domain... same error.

At the moment, the website is still running on PHP7.4.33.

I get a notification to upgrade to J5, but that's not even working, probably because of the old PHP version.

Ofi Khan Staff

Apology for the delay. Please keep a full site backup first. Then uninstall SP Page Builder and install the latest version again. Then check your issue.

Seppe Asked this

Good afternoon
if I uninstal SPPB.... will all pages be gone then?
There is almost no data in "normal" content in Joomla.

Just asking before I start uninstalling :)

Log in to reply.