[Skip to main content](#vessel-content)

#   Compile error in add new payment method

##

- **[W13ear](/forum/user/46011-w13ear "View W13ear's Profile")**
- [![W13ear's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/46011-w13ear "View W13ear's Profile") Topic Author
- [ Offline](/forum/user/46011-w13ear)

Less More

- Posts: 40
- Thank you received: 0
-
-

2 years 8 months ago [\#359200](#359200) by [W13ear](/forum/user/46011-w13ear "View W13ear's Profile")  *[Compile error in add new payment method](/forum/29-payment-methods/907775-compile-error-in-add-new-payment-method#359200 "-- url of the page with the problem -- :   shop.hansplanje.nl  -- HikaShop version -- : 5.0.3 -- Joomla version -- : 4.4.2 -- PHP version -- : 8.1 -- Browser(s) name and version -- : firefox latest -- Error-message(debug-mod must be tuned on) -- : Hi, I found an compile error in HikaShop when creating a new payment method.  The error mentions: Compile Error: Array and string offset access syntax with curly braces is no longer supported (in line 17) ----- public static function getScriptNameFromUrl ( $url ) { $path = parse&#95;url($url, PHP&#95;URL&#95;PATH); $len = strlen($path); if ( $len == 0 || '/' == $path{$len-1} ) { return &quot;&quot;; } return basename($path); } -----  Hi,  When adding a new payment method I got a http 500 fatal error.  Can you look into this issue?  Kind regards,  Winfried Buijen")* was created by *[W13ear](/forum/user/46011-w13ear "View W13ear's Profile")*

-- url of the page with the problem -- : [ shop.hansplanje.nl](https://shop.hansplanje.nl)
-- HikaShop version -- : 5.0.3
-- Joomla version -- : 4.4.2
-- PHP version -- : 8.1
-- Browser(s) name and version -- : firefox latest
-- Error-message(debug-mod must be tuned on) -- : Hi, I found an compile error in HikaShop when creating a new payment method.

The error mentions: Compile Error: Array and string offset access syntax with curly braces is no longer supported (in line 17)

---

public static function getScriptNameFromUrl ( $url )
{
$path = parse_url($url, PHP_URL_PATH);
$len = strlen($path);
if ( $len == 0 &#124;&#124; '/' == $path{$len-1} ) {
return "";
}
return basename($path);
}

---

Hi,

When adding a new payment method I got a http 500 fatal error.

Can you look into this issue?

Kind regards,

Winfried Buijen

[ ![HikaShopfatalerrorpayment.png](/forum/attachment/58848) ](/forum/attachment/58848 "...rorpayment.png")

- [ ![HikaShopfatalerrorpayment.png](/forum/attachment/58848) ](/forum/attachment/58848 "...rorpayment.png") [ ](/forum/attachment/58848?download=1 "...rorpayment.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy85MDc3NzUtY29tcGlsZS1lcnJvci1pbi1hZGQtbmV3LXBheW1lbnQtbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

2 years 8 months ago [\#359201](#359201) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Compile error in add new payment method](/forum/29-payment-methods/907775-compile-error-in-add-new-payment-method#359201 "-- url of the page with the problem -- :   shop.hansplanje.nl  -- HikaShop version -- : 5.0.3 -- Joomla version -- : 4.4.2 -- PHP version -- : 8.1 -- Browser(s) name and version -- : firefox latest -- Error-message(debug-mod must be tuned on) -- : Hi, I found an compile error in HikaShop when creating a new payment method.  The error mentions: Compile Error: Array and string offset access syntax with curly braces is no longer supported (in line 17) ----- public static function getScriptNameFromUrl ( $url ) { $path = parse&#95;url($url, PHP&#95;URL&#95;PATH); $len = strlen($path); if ( $len == 0 || '/' == $path{$len-1} ) { return &quot;&quot;; } return basename($path); } -----  Hi,  When adding a new payment method I got a http 500 fatal error.  Can you look into this issue?  Kind regards,  Winfried Buijen")*

Hi,

This error comes from this code: $path{$len-1}
This is not valid in recent versions of PHP. It should be $path[$len-1] instead.

There was actually this code in the old versions of the Platron plugin which hasn't been included in HikaShop for years and which latest version can be found here:
[ github.com/HikaShop/hikashoppayment-platron](https://github.com/HikaShop/hikashoppayment-platron)
So either update the plugin or uninstall it if you're not using it and you won't have this error.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy85MDc3NzUtY29tcGlsZS1lcnJvci1pbi1hZGQtbmV3LXBheW1lbnQtbWV0aG9kP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.053 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
