Improve pen list handling
This commit is contained in:
parent
159920a05d
commit
d219e004df
|
@ -837,9 +837,12 @@ class ModuleTemplates extends HTML
|
||||||
|
|
||||||
$penInfo = db_get_all_rows_filter('tnetwork_profile_pen', ['id_np' => $this->id_np]);
|
$penInfo = db_get_all_rows_filter('tnetwork_profile_pen', ['id_np' => $this->id_np]);
|
||||||
$penList = [];
|
$penList = [];
|
||||||
|
// Handle if list of PEN does not exist or is empty.
|
||||||
|
if ($penInfo !== false) {
|
||||||
foreach ($penInfo as $pen) {
|
foreach ($penInfo as $pen) {
|
||||||
$penList[] = $pen['pen'];
|
$penList[] = $pen['pen'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->pen = implode(',', $penList);
|
$this->pen = implode(',', $penList);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue