Commit fd08d6a0 authored by Jeroen's avatar Jeroen

Fixed issue with error on edit page if no activities are found

parent aca49afb
Pipeline #1342 passed with stage
in 1 second
......@@ -164,7 +164,6 @@ VALUES (3, 'Jeroen Grooten', '', 'jeroen.grooten@bof.nl', '4680E004', 40, 40);
INSERT INTO `Employee`(`organisation`, `name`, `nickname`, `email`, `pgp_id`, `contract_hours_per_week`, `usual_hours_per_week`)
VALUES (1, 'Jeroen Grooten', '', 'jeroen.grooten@bof.nl', '4680E004', 40, 40);
INSERT INTO `ExpertiseEmployee`(`employee`, `expertise`) VALUES(1, 1);
INSERT INTO `ExpertiseEmployee`(`employee`, `expertise`) VALUES(1, 2);
INSERT INTO `ExpertiseEmployee`(`employee`, `expertise`) VALUES(2, 1);
......
......@@ -188,10 +188,14 @@ if ( $user->checkForAdminLogin( $_SESSION ) ) {
<i><b><?php echo L::form_split_by ?></b></i>
<?php
$parsed = array();
foreach($meta['activities'] as $a){
$parsed[] = $o->parseActivity($a);
if ( !empty( $meta['activities'] ) ) {
foreach($meta['activities'] as $a){
$parsed[] = $o->parseActivity($a);
}
$activities = implode(', ', $parsed);
} else {
$activities = '';
}
$activities = implode(', ', $parsed);
?>
<input class="activity form-control" type="text" name="activity" placeholder="activities" autocomplete="off" value="<?php echo $activities ?>"/>
<input type="hidden" name="id" value="<?php echo $meta['id'] ?>">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment