Warning: Cannot use a scalar value as an array in

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 ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-15-2003
Redcat
 
Posts: n/a
Default 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


Reply With Quote
  #2 (permalink)  
Old 07-15-2003
Janwillem Borleffs
 
Posts: n/a
Default 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


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:16 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0