Error Message

Error Message

by Will Muenchow -
Number of replies: 5

My moodle is coming up with an error for the Calender block now. Here is the error.

Warning: array_diff(): Argument #1 is not an array in D:\Web Sites\MC Online\calendar\lib.php on line 123

Now this error starting come up a few hours after I turned on a session var within the php ini file. Any ideas??

Average of ratings: -
In reply to Will Muenchow

Re: Error Message

by Will Muenchow -
Hello? Am I all alone?
In reply to Will Muenchow

Re: Error Message

by John Papaioannou -
You aren't alone, and I believe you aren't using the latest version of calendar either. Can you open up calendar/lib.php and tell us what the first line reads like? This mentions the version of the file you have.

For example, mine reads:

<?php // $Id: lib.php,v 1.69 2004/07/09 13:39:34 defacer Exp $


In reply to John Papaioannou

Re: Error Message

by Will Muenchow -

I'm running moodle 1.3 - This is the Calandar that came with 1.3 install.

<?php // $Id: lib.php,v 1.60 2004/05/25 02:00:26 moodler Exp $

The system is being run as a production server, thus why it is not updated with CVS daily. Now, if I were to update the the newest Calandar system would this work with 1.3, and why after  1 1/2 months of running would it just die?

In reply to Will Muenchow

Re: Error Message

by John Papaioannou -
This explains things...

What you came upon is a last-minute "bug" inadvertently introduced to 1.3 before it was released. It really is not a bug, in the sense that apart from printing a warning it doesn't do anything you wouldn't expect. You have two solutions for your case:

  1. Open up lib.php and prepend the character @ at the start of the line you get the error. This tells PHP to suppress error reporting specifically for this line, and will solve the problem with a minimum of fuss.
  2. Upgrade to any more recent version in the 1.3.x branch (the bug fix for this was introduced before 1.3.1 was released). This should increase the overall stability of your system too, since after releasing a major version like 1.3 we only do bugfixes on it. By upgrading to 1.3.3, for example, you will keep the stability of the 1.3 release while fixing a few bugs such as this. Everything will work normally.

I strongly advise you to upgrade, but if that's a lot of trouble, you can follow the first solution.

Jon
In reply to John Papaioannou

Re: Error Message

by Will Muenchow -

It worked! Thanks alot! I'll be upgrading when 1.4 comes out. Quick question, I got this error and another one on the exact same day. The other is when I try to upgrade a quiz or save another one I get this error

This module is missing important code! (D:\Web Sites\MC Online/mod//lib.php)

I have not been able to figure this one out at all either. Not sure if I replace the lib.php file and if I need to do that upgrading to the newest quiz mod is 1.4 which I don't have.