diff options
author | rzeka <piotr@rzeka.net> | 2014-02-22 13:27:01 +0100 |
---|---|---|
committer | rzeka <piotr@rzeka.net> | 2014-02-22 13:27:01 +0100 |
commit | fd28d50597d4f255ba9514e0fc03c8cb67c86f22 (patch) | |
tree | db53560fd19909a8a4cfc57dcfe7108c612ced41 | |
parent | 45753e51d19ac8bd598e014b9a240ab44547c7aa (diff) |
Fixed PHP notice when user's default project doesn't exist
-rw-r--r-- | templates/config_index.php | 4 | ||||
-rw-r--r-- | templates/user_index.php | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/templates/config_index.php b/templates/config_index.php index 72edc4ad..f18078c1 100644 --- a/templates/config_index.php +++ b/templates/config_index.php @@ -51,9 +51,9 @@ <ul> <li> <strong><?= t('My default project:') ?> </strong> - <?= isset($user['default_project_id']) ? $projects[$user['default_project_id']] : t('None') ?>, + <?= (isset($user['default_project_id']) && isset($projects[$user['default_project_id']])) ? $projects[$user['default_project_id']] : t('None') ?>, <a href="?controller=user&action=edit&user_id=<?= $user['id'] ?>"><?= t('edit') ?></a> </li> </ul> </section> -</section>
\ No newline at end of file +</section> diff --git a/templates/user_index.php b/templates/user_index.php index 20baac2f..ac8f086e 100644 --- a/templates/user_index.php +++ b/templates/user_index.php @@ -27,7 +27,7 @@ <?= $user['is_admin'] ? t('Yes') : t('No') ?> </td> <td> - <?= $projects[$user['default_project_id']] ?> + <?= (isset($user['default_project_id']) && isset($projects[$user['default_project_id']])) ? $projects[$user['default_project_id']] : t('None'); ?> </td> <td> <?php if ($_SESSION['user']['is_admin'] == 1 || $_SESSION['user']['id'] == $user['id']): ?> @@ -45,4 +45,4 @@ </table> <?php endif ?> </section> -</section>
\ No newline at end of file +</section> |