[pmwiki-users] the ubiquitous "Cannot modify header information" msg
Patrick R. Michaud
pmichaud at pobox.com
Tue Nov 29 16:05:43 CST 2005
On Tue, Nov 29, 2005 at 12:56:07PM -0900, Ilana Kingsley wrote:
> I've read many of the postings regaring this error msg and can't seem to
> get the msg to go away.
>
> Warning: array_merge() [function.array-merge]: Argument #1 is not an array
> in /opt/apache/htdocs/cswiki/pmwiki.php on line 1290
> ...
> I'm running PHP 5.0.4 (cli) (built: May 17 2005 17:25:04)
> Install of pmwiki-2.1.beta6
>
> My .php files don't have extraneous ending lines/spaces.
>
> Line 1290 of pmwiki.php is
> $AuthList = array_merge($Authlist, (array)@$_SESSION['authlist']);
>
> Line 714 or pmwiki.php is
> foreach($HTTPHeaders as $h) (@$sent++) ? @header($h) : header($h);
>
Eek! That line 1290 should instead read
$AuthList = array_merge($AuthList, (array)@$_SESSION['authlist']);
(note the capitalization on the second $AuthList). I'm not sure
why my error checking didn't catch it (although part of the reason
is that the parameter handling for array_merge changed from PHP 4.4
to 5.0)
At any rate, it's now fixed in 2.1.beta7 (just released).
Thanks.
Pm
More information about the pmwiki-users
mailing list