Skip to content

Fix combined search null references to recordTotal#15

Open
maccabeelevine wants to merge 1 commit intoEquinoxOpenLibraryInitiative:mainfrom
maccabeelevine:main
Open

Fix combined search null references to recordTotal#15
maccabeelevine wants to merge 1 commit intoEquinoxOpenLibraryInitiative:mainfrom
maccabeelevine:main

Conversation

@maccabeelevine
Copy link
Copy Markdown

Nice theme! Testing combined search, I got a null reference error for $recordTotal. In other template files in your theme and others, this variable was set from $this->results->getResultTotal().

if (isset($this->parseError)):
$headTitleText = $this->transEsc('nohit_parse_error');
elseif ($recordTotal < 1):
elseif ($this->results->getResultTotal() < 1):
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reference to $recordTotal generated the error.

'%%start%%' => $this->localizedNumber($this->results->getStartRecord()),
'%%end%%' => $this->localizedNumber($this->results->getEndRecord()),
'%%total%%' => $this->localizedNumber($this->recordTotal),
'%%total%%' => $this->localizedNumber($this->results->getResultTotal()),
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I never hit an error here (not sure the code path) but it seemed best to change in both places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant