Ask a Question related to PHP Development, Design and Development.
-
Redcat #1
Warning: Cannot use a scalar value as an array in
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 Guest
-
#40752 [NEW]: parse_ini_file() segfaults when a scalar setting is redeclared as an array
From: hubert dot roksor at gmail dot com Operating system: PHP version: 5.2.1 PHP Bug Type: Reproducible crash Bug... -
#38974 [Opn->Bgs]: array should throw warning
ID: 38974 Updated by: derick@php.net Reported By: hendlerman at yahoo dot com -Status: Open +Status: ... -
Array into scalar
Hi, I have an array derived from a set of radio buttons that I want to break down into a single variable for use with a database. How can I do... -
testing for array or scalar in a hash.
Hi, I have a hash containing, data, everything is generated on the fly so my hash, has some scalars, and some arrays, in it. How can I test wether... -
letters in a scalar to array
hello. i'd like to take the letters in a scalar and make each of them an element in an array. here's what i've got so far.... #!/usr/bin/perl... -
Janwillem Borleffs #2
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...I> 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 soYou don't have to post an URL, only significant code which is pointed out by> can't post the URL here.
>
> "Warning: Cannot use a scalar value as an array in..."
>
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
Janwillem Borleffs Guest



Reply With Quote

