I only get the following error message when using Tagadelic Views, it does not appear if I disable TV:

warning: in_array() [function.in-array]: Wrong datatype for second argument in /opt/lampp/htdocs/drupal/sites/all/modules/calendar/calendar_ical.module on line 377.

CommentFileSizeAuthor
#8 144404.patch616 bytesdouggreen

Comments

kaw3939’s picture

Hello,

I receive the same error. Just thought you should know.

jiangxijay’s picture

I get the following error when selecting View type: Tagdelic ...

warning: Invalid argument supplied for foreach() in /home/ sites/all/modules/calendar/calendar.module on line 1201.

Modules:

Calendar 5.x-1.x-dev (packaged 2007-10-12)
Tagadelic views 5.x-1.x-dev (packaged 2007-07-28)
Tagadelic 5.x-1.x-dev (packaged 2007-09-03)

jiangxijay’s picture

I would add that, when I change the view type to, say, Teaser, the error does not appear. Strange ...

marcoBauli’s picture

adding my warning to the list:

warning: Invalid argument supplied for foreach() in /home/tm/public_html/drupal/sites/all/modules/calendar/calendar.module on line 1204.

Latest Calendar, Tagadelic and Tagadelic Views modules.

marcoBauli’s picture

here's a small workaround that fixes the warning:

--- calendar.module     2007-11-21 17:04:05.000000000 +0100
+++ calendar.module.orig        2007-10-25 18:59:39.000000000 +0200
@@ -1201,11 +1201,9 @@ function calendar_real_url($view, $args)
      $bump++;
    }
  }
-  if(is_array($args)) {
-      foreach ($args as $delta => $arg) {
-       if (!in_array($delta + $bump, calendar_arg_positions($view)) && !empty($arg)) {
-        array_push($parts, $arg);
-       }
+  foreach ($args as $delta => $arg) {
+    if (!in_array($delta + $bump, calendar_arg_positions($view)) && !empty($arg)) {
+      array_push($parts, $arg);
    }
  }
  return implode('/', $parts);
misterlawrence’s picture

Hi Marco,

This is the exact problem I am having as well. I would like to implement your solution, but can't quite figure out what I am supposed to do with the snippet you provided.

I imagine that I should include this snippet in the text of the calendar.module. Is that correct? If so, where does it go in the module, and is it in addition to the other parts of the module, or is it to replace a particular portion of the module?

Any help would be appreciated!

akasman’s picture

misterlawrence,

I replaced these, existing lines:

+ foreach ($args as $delta => $arg) {
+ if (!in_array($delta + $bump, calendar_arg_positions($view)) && !empty($arg)) {
+ array_push($parts, $arg);

with these ones:

- if(is_array($args)) {
- foreach ($args as $delta => $arg) {
- if (!in_array($delta + $bump, calendar_arg_positions($view)) && !empty($arg)) {
- array_push($parts, $arg);
- }

(Of course not including the diff + and - signs). That did it for me.

Hope that helps.

douggreen’s picture

Project: Views Tagadelic » Calendar
Status: Active » Needs review
StatusFileSize
new616 bytes

I'm switching the project issue queue for this, since the fix for issue is against the calandar module and not tagadelic_views. I'm also attaching the patch (instead of having it inline) and marking as CNR.

misterlawrence’s picture

akasman and Marcos,

Thank you both so much for your kind replies. It does indeed work...like magic (to a non-programmer like me!).

Take care,

David

karens’s picture

Status: Needs review » Closed (duplicate)

Maybe a duplicate of http://drupal.org/node/212040.