Warning: Cannot use a scalar value as an array in /home/partners/public_html/news/shownews.php on line 575

Asked by Steve

New installation.

On this test page: http://www.partnersinprogresspip.com/index2.php

When I click on comments I get this error:

Warning: Cannot use a scalar value as an array in /shownews.php on line 575

Any idea why? Is this a php4 / php5 issue?

Also curious is that comments are disabled, but it still lets you. Possibly related to the error above?

Please, and thank you!

Steve

Question information

Language:
English Edit question
Status:
Answered
For:
phpns Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
alecwh (alecwh) said :
#1

That is very odd. We have not yet had any complains with this... try
updating PHP, and if that doesn't work, let me know. You should file a
bug report.

On Fri, 2008-11-07 at 22:18 +0000, Steve wrote:
> New question #50605 on phpns:
> https://answers.launchpad.net/phpns/+question/50605
>
> New installation.
>
> On this test page: http://www.partnersinprogresspip.com/index2.php
>
> When I click on comments I get this error:
>
> Warning: Cannot use a scalar value as an array in /shownews.php on line 575
>
> Any idea why? Is this a php4 / php5 issue?
>
> Also curious is that comments are disabled, but it still lets you. Possibly related to the error above?
>
> Please, and thank you!
>
> Steve
>
--
Alec Henriksen <email address hidden> @ http://alecwh.com

Revision history for this message
Steve (steve-electronmonkey) said :
#2

I have php4 and 5 on my server. php4 is default right now. I just tried calling up php5 in the .htaccess file and I still got the same error.

When I first installed I couldn't login in and had to modify the function.php with the info I found here.

function htmlspecialchars_decode($str) {
    return strtr($str,
array_flip(get_html_translation_table(HTML_SPECIALCHARS)));
}

Then I was getting the same error on the shownews.php page, and again I added the same code I found here to that file.

Then it appeared it was all working until I discovered the error that this post is about.

Does it matter where you put that special character function in the function.php and shownews.php files? Did anything need to be taken out?

When I switched to php5 I tried with the mod above and with it commented out. Still got the same error

Revision history for this message
alecwh (alecwh) said :
#3

No, I still don't know what is wrong. As long as you put the function
near the top of the files, you should be fine. File a bug report.

Can you help with this problem?

Provide an answer of your own, or ask Steve for more information if necessary.

To post a message you must log in.