QuickTable: gracefully handle missing columns
This commit is contained in:
parent
99dfe54637
commit
5d643534ad
|
@ -35,7 +35,14 @@ abstract class QuickTable implements Paginatable
|
||||||
$firstRow = true;
|
$firstRow = true;
|
||||||
|
|
||||||
foreach ($this->getTitles() as $key => $title) {
|
foreach ($this->getTitles() as $key => $title) {
|
||||||
$val = $row->$key;
|
|
||||||
|
// Support missing columns
|
||||||
|
if (property_exists($row, $key)) {
|
||||||
|
$val = $row->$key;
|
||||||
|
} else {
|
||||||
|
$val = null;
|
||||||
|
}
|
||||||
|
|
||||||
$value = null;
|
$value = null;
|
||||||
|
|
||||||
if ($firstRow) {
|
if ($firstRow) {
|
||||||
|
|
Loading…
Reference in New Issue