Skip to content

Commit 3be575b

Browse files
committed
Fixed null array bug
Fixed null array bug in Dining.php line 315
1 parent 23db3a7 commit 3be575b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Ncstate/Service/Dining.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,10 @@ protected function _request($method, $args)
312312

313313
// The response will always have a wrapper element that is the version of the API we're using.
314314
// We don't care about that, so we'll strip it out
315-
$this->_lastParsedResponse = array_pop($this->_lastParsedResponse);
316-
315+
if ($this->_lastParsedResponse != NULL) {
316+
$this->_lastParsedResponse = array_pop($this->_lastParsedResponse);
317+
}
318+
317319
// if it was xml, we'll remove the attributes that were attached to the
318320
// root element as they were meaningless
319321
if ($this->_format == 'xml') {

0 commit comments

Comments
 (0)