[EventCalendar] Re: EventCalendar Digest, Vol 10, Issue 8

Dave Sabol desabol at gmail.com
Thu Aug 24 12:17:38 UTC 2006


Darrell,

Thanks for the link. I did some exploring of my own, and found that
the offending code (character) was actually a simple ampersand &
that was likely a throwback to PHP4 code. I am just getting my feet
wet with PHP (I am a vbscript / asp / asp.net guy) but am finding PHP
to be very easy to learn, infinitely powerful and scalable). That
said, here is what I posted to blog.firetree.net with regard to what I
found.

In the code, right around line 61, there is a declaration in the
array_flip() which throws a warning message. As noted below:

Warning: Call-time pass-by-reference has been deprecated - argument
passed by value; If you would like to pass it by reference, modify the
declaration of arrayflip(). If you would like to enable call-time
pass-by-reference, you can set allowcalltimepass_reference to true
in your INI file. However, future versions may not support this any
longer.

I found that by tracking down the offending line noted below:

// Flip $postids so that it maps post ID to position in the $posts array.
$postids=arrayflip(&$postids);
if($postids && $schedule)
foreach($schedule as $s)
{
$i=$postids[$s->postid];
$posts[$i]->ec3schedule[]=$s;
}
return $posts;

If you remove the ampersand prior to $post_ids, it fixes the problem.
I believe the & was part of the PHP4 syntax.

Again, many thanks for the assist.

Dave

On 8/24/06, eventcalendar-request at firetree.net
<eventcalendar-request at firetree.net> wrote:
> Send EventCalendar mailing list submissions to
>         eventcalendar at firetree.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://penguin.firetree.net/cgi-bin/mailman/listinfo/eventcalendar
> or, via email, send a message with subject or body 'help' to
>         eventcalendar-request at firetree.net
>
> You can reach the person managing the list at
>         eventcalendar-owner at firetree.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of EventCalendar digest..."
>
>
> Today's Topics:
>
>    1. Done, but with errors on page (ari justin)
>    2. Error Message(s) (Dave Sabol)
>    3. Re: Error Message(s) (Darrell Schulte)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 23 Aug 2006 14:59:11 +0000
> From: "ari justin" <arijustin at hotmail.com>
> Subject: [EventCalendar] Done, but with errors on page
> To: eventcalendar at firetree.net
> Message-ID: <BAY101-F115110FB89A89C76770C8FAA470 at phx.gbl>
> Content-Type: text/plain; format=flowed
>
> I am using Event Calendar 3.0.4 with Wordpress 2.0. Event Calendar is
> displaying all my information in the event catagory correctly but I am
> getting an error. In IE 6.0 on the lower left corner of the browser I am
> getting a caution symbol saying - Done, but with errors on page, The error
> is listed as:
>
> line:111
> char:2
> error: 'ec3' is undefined
> code:0
>
> I am not sure if this error can lead my page getting hacked but would like
> to fix this issue and don't know how to approach the problem. My site is at
> http://indiepunk.us. Any help that could be offered would be gretaly
> appreciated.
>
> Thank You,
>
> Ari
>
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 23 Aug 2006 14:03:19 -0400
> From: "Dave Sabol" <desabol at gmail.com>
> Subject: [EventCalendar] Error Message(s)
> To: eventcalendar at firetree.net
> Message-ID:
>         <a162aac10608231103u72e25e33o5070d31511976b54 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> I just tried to install EC 3.1.pre11 on my install of WP 2.0.4. Upon
> activation, I received this message.
>
> Warning: Call-time pass-by-reference has been deprecated - argument
> passed by value; If you would like to pass it by reference, modify the
> declaration of array_flip(). If you would like to enable call-time
> pass-by-reference, you can set allow_call_time_pass_reference to true
> in your INI file. However, future versions may not support this any
> longer. in /home/.gothic/desabol/sprcc.net/wp-content/plugins/eventcalendar3/eventcalendar3.php
> on line 61
>
>  Fatal error: Cannot redeclare ec3_action_wp_head() (previously
> declared in /home/.gothic/desabol/sprcc.net/wp-content/plugins/eventcalendar3/eventcalendar3.php:74)
> in /home/.gothic/desabol/sprcc.net/wp-content/plugins/widgets/eventcalendar3.php
> on line 236
>
> Any thoughts?
>
>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 23 Aug 2006 13:09:10 -0500
> From: Darrell Schulte <d at schulte.mn>
> Subject: Re: [EventCalendar] Error Message(s)
> To: eventcalendar at firetree.net
> Message-ID: <52A90A9A-DF0E-4D13-8B68-F7D792D7E176 at schulte.mn>
> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>
>
> On Aug 23, 2006, at 1:03 PM, Dave Sabol wrote:
>
> > I just tried to install EC 3.1.pre11 on my install of WP 2.0.4. Upon
> > activation, I received this message.
> >
> > Warning: Call-time pass-by-reference has been deprecated - argument
> > passed by value; If you would like to pass it by reference, modify the
> > declaration of array_flip(). If you would like to enable call-time
> > pass-by-reference, you can set allow_call_time_pass_reference to true
> > in your INI file. However, future versions may not support this any
> > longer. in /home/.gothic/desabol/sprcc.net/wp-content/plugins/
> > eventcalendar3/eventcalendar3.php
> > on line 61
>
> Dave,
>
> Removing the warning (although I don't know if it impacts anything):
>
> http://penguin.firetree.net/pipermail/eventcalendar/2006-August/
> 000489.html
>
>
> Darrell Schulte
> http://schulte.mn
>
>
>
>
>
> ------------------------------
>
> _______________________________________________
> EventCalendar mailing list
> EventCalendar at firetree.net
> http://penguin.firetree.net/cgi-bin/mailman/listinfo/eventcalendar
>
>
> End of EventCalendar Digest, Vol 10, Issue 8
> ********************************************
>



More information about the EventCalendar mailing list