using views 3, the following error appears on a view once a page display is added:

warning: Invalid argument supplied for foreach() in /home/medg33k/public_html/sites/all/modules/page_title/page_title.module on line 956.

lines 956-959

foreach ($display->display_options['arguments'] as $arg_id => $arg) { 
      #dpm($arg_id);
      #dpr($arg);
    }

Comments

nicholasthompson’s picture

Thanks for reporting this - the views integration in the dev branc is very much in development and is only "tested" with Views 2. I've not even had a chance to try Views 3 yet.

mikeytown2’s picture

Happens with views 2.11

simple fix

    if (is_array($display->display_options['arguments'])) {
      foreach ($display->display_options['arguments'] as $arg_id => $arg) {
        #dpm($arg_id);
        #dpr($arg);
      }
    }
nicholasthompson’s picture

Ah right - thanks for the pointer! :)

mariafromatoz’s picture

Thanks mikeytown2; worked like a charm!

Using:
Page Title 6.x-2.x-dev
Views 6.x-3.x-dev
PHP 5.3

Ta,
Maria

jackhutton’s picture

thanks mikey.. w. some trepidation i edited the .module file & voila..success. .thank you..

fletch11’s picture

Thanks. Any chance this could get committed?

matason’s picture

Status: Active » Needs review
StatusFileSize
new894 bytes

I've created a patch using the suggested code in comment #2 which checks for an array before the foreach(). I couldn't interpret the TODO so I've not delved into implementing whatever this code was originally intended to do.

nicholasthompson’s picture

Status: Needs review » Fixed

Thanks Matason - this was actually committed (a variant of, in fact) as part of #595700: Views integration.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.