Re: Warning: Cannot use a scalar value as an array in
"Redcat" <nospam@redcatmedia.co.uk> schreef in bericht
news:bf0lch$os4$1@sparta.btinternet.com...
> Hi all
>
> This has just started coming up on a site I run. I haven't changed
> anything, it just started happening. Unfortunately, it's an adult site so
I
> can't post the URL here.
>
> "Warning: Cannot use a scalar value as an array in..."
>
You don't have to post an URL, only significant code which is pointed out by
the line number in the error message. The only I can do for now is to show
you how to reproduce this error:
<?
$scalar = 1;
$scalar[] = 1;
?>
$scalar is initiated as an integer, which is a scalar. In the second line,
$scalar gets a value assigned the way you would assign a value to an array.
Only, $scalar isn't an array but a scalar and this causes the warning.
Look at the line indicated by the error message in your file and look for
something simular to this example.
JW
|