A
A
Alex-19172017-10-12 20:14:19
MODX
Alex-1917, 2017-10-12 20:14:19

How to fix PHP warning: Illegal string offset 'success'?

In the error log, on each hit of the cart page, I get this:

[2017-10-12 19:48:31] (ERROR @ *******/core/cache/includes/elements/modsnippet/22.include.cache.php : 11) PHP warning: Illegal string offset 'success'

Here are lines 10 and 11
/* check payment */
$response = $mspReceiptAccount->paymentType($_GET['msorder']);
if(!$response['success']) return '';

No one has overcome this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Snewer, 2017-10-12
@alex-1917

if(!isset($response['success']) || empty($response['success'])) return '';

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question