This is a discussion on Warning: Cannot use a scalar value as an array in within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi all This has just started coming up on a site I run. I haven't changed anything, it just ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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..." In a nutshell, the site is a photo gallery for amateurs. They can upload images into the various albums. My gut feeling is that someone has uploaded something with illegal characters in a filename or something. This would explain why ti wasn't happening yesterdayand it is today. If, from this small piece of imformation, someone can give me some pointers, I'd be most grateful. A |
|
|||
|
"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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|