Can't update views module from 6.x-3.0-alpha3 to latest 6.x-3.x-dev (datestamp = "1302136379").

Trying to exec update.php, and get an error:
PHP Fatal error: Unsupported operand types in sites/all/modules/contrib/views/views.module on line 122

Because _views_find_module_templates function returns not initialized variable $templates.

In old views module (6.x-3.0-alpha3) all works fine.

Comments

dawehner’s picture

perhaps we $templates = array(); at the beginning of the function would help.

pprischepa’s picture

It helps, but there is another error appears. I've rescan templates for one of views and there are no templates. I think the reason in _views_find_module_templates() can't find any templates.

I think these two things are somehow connected.

pprischepa’s picture

Status: Active » Needs review

I 've downloaded latest 6.x-3.x-dev release. And everything works for me :).

Except one bug - $templates variable not initialized at _views_find_module_templates function.

Who can solve this problem?

function _views_find_module_templates($cache, $path) {
  $templates = array();
...
merlinofchaos’s picture

Status: Needs review » Active

Can you please paste the exact error you get, including the line number?

Also 'needs review' is a status that means there is a patch attached. Please don't use it. The previous status was correct. :/

And I'd say dereine is correct. I'm not even sure what the last comment is even saying, since it seems to include what looks like the probable fix but 1) it isn't a patch and 2) the text doesn't seem to match the included code.

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new431 bytes

Okay here is a patch. Please try it out.1120668

pprischepa’s picture

Certainly, exact error:
PHP Fatal error: Unsupported operand types in sites/all/modules/contrib/views/views.module on line 122

See issue description for more details

dawehner’s picture

Did this patch fixes your problem?

Can you try the latest version again, just to sync the line numbers.

pprischepa’s picture

StatusFileSize
new360 bytes

Yes, this patch fixes my problem.

dawehner’s picture

Status: Needs review » Fixed

Thanks for testing it.

Commited to both 6.x-3.x branches.

Status: Fixed » Closed (fixed)

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

jbfelix’s picture

Status: Closed (fixed) » Active

Still not working with last dev version (6.x-3.x-dev 2011-Aug-30)
Any help ?

dawehner’s picture

Status: Active » Closed (won't fix)

@Moove
If you can't provide informations there doesn't seem to be a bug.
"Still not working", but hey it works for me, so it's impossible to reproduce :)

In general please don't reopen old issues, but better open a new one with actual informations.