This is an extremely minor thing but just thought I'd mention it in case it bites anyone else.

I was form_altering an Advanced Forum view into the options of what can be used for a RON. I made a mistake and didn't add the view name as the index so the variable got set to 1. In og_views_view_group, it doesn't find the view and sets the message that it's not found. That's fine. But then it keeps going and hits:

if (!empty($view->total_rows) || !empty($view->num_rows) || !empty($view->page_empty) || $view->display_handler->get_option('empty')) {

Since there is nothing in $view, $view->display_handler->get_option('empty') causes an error. To be honest, I don't know why it does since you think it would stop evaluating that line as soon as it hits the total rows being empty. But it definitely errored on that line, choking on the "get_option" part and "$view" was empty.

Michelle

CommentFileSizeAuthor
#1 og.562738.patch584 bytesGrayside
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Grayside’s picture

Status: Active » Needs review
FileSize
584 bytes

Yeah, looks like the $view->get_title() will fail as well. Looks like the code needs to end gracefully where it realizes the view is non-existent.

Michelle’s picture

At the moment, my only use of OG is on a site that I am not touching until I can rebuild it. My next use of it will be in D7. I feel bad that I started this issue and am not now willing to test the patch but, to be fair, I filed it 2 years ago. I just don't have time right now to set up a D6 test environment now that I've moved on to D7.

Michelle

Grayside’s picture

I greatly appreciate the notice. I've recently stepped in to do some maintaining on OG6 and kind of tossed the patch up in passing. There are a great many issues, many of them both old and deprecated. Been closing them by the dozen in hopes that the still relevant ones may be seen.

Grayside’s picture

Status: Needs review » Fixed

Committed along with duplication of the odd title escaping code. Seems unneeded but preserving consistency with current practice...

http://drupalcode.org/project/og.git/commit/09375ff

Status: Fixed » Closed (fixed)

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