# Bug: applicationFormRefereeLink condition always true when URLs are empty

**URL:** <https://ask.gibbonedu.org/t/bug-applicationformrefereelink-condition-always-true-when-urls-are-empty/15600>\
**Category:** Administration\
**Created:** [August 26, 2026, 5:40pm UTC](https://ask.gibbonedu.org/t/bug-applicationformrefereelink-condition-always-true-when-urls-are-empty/15600 "2026-08-26T17:40:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xavier\_Bit](https://ask.gibbonedu.org/user_avatar/ask.gibbonedu.org/xavier_bit/32/903_2.png) [@Xavier\_Bit](https://ask.gibbonedu.org/u/Xavier_Bit)\
**Post date:** [August 26, 2026, 5:40pm UTC](https://ask.gibbonedu.org/t/bug-applicationformrefereelink-condition-always-true-when-urls-are-empty/15600/1 "2026-08-26T17:40:11Z")

</div>

Hi Gibbon Team!

We are setting up the job application on the landing page of our install and I found what looks like a bug.

In `modules/Staff/applicationForm.php`, the References section renders even when no referee link URLs are set.  
The setting is stored as a serialized array  
`a:2:{s:8:"Teaching";s:0:"";s:7:"Support";s:0:"";}`  
but the condition checks  
`if ($applicationFormRefereeLink != '')`  
against the raw serialized string, which is always non-empty.

The References section therefore **always** appears on the public Staff Application Form regardless of whether referee links are configured.

**Gibbon version:** v30.0.01

**Expected behaviour:** References section should only appear when at least one referee link URL is set.

**Suggested fix:** Unserialize the value before checking, or check individual array values rather than the raw string.

Let me know if this isn’t a bug and I did it wrong or if you need more information!

---

<div class="post-metadata">

**Author:** ![Xavier\_Bit](https://ask.gibbonedu.org/user_avatar/ask.gibbonedu.org/xavier_bit/32/903_2.png) [@Xavier\_Bit](https://ask.gibbonedu.org/u/Xavier_Bit)\
**Post date:** [September 9, 2026, 7:42pm UTC](https://ask.gibbonedu.org/t/bug-applicationformrefereelink-condition-always-true-when-urls-are-empty/15600/2 "2026-09-09T19:42:06Z")

</div>

Bump for @Ali

We are still hoping this finds it’s way into the next update and we had to modify the core code to get it working.

---

<div class="post-metadata">

**Author:** ![Ali](https://ask.gibbonedu.org/user_avatar/ask.gibbonedu.org/ali/32/1024_2.png) [@Ali](https://ask.gibbonedu.org/u/Ali)\
**Post date:** [September 28, 2026, 2:15am UTC](https://ask.gibbonedu.org/t/bug-applicationformrefereelink-condition-always-true-when-urls-are-empty/15600/3 "2026-09-28T02:15:47Z")

</div>

Hi @Xavier_Bit  
Thanks for reporting the issue as well as providing a suggested fix. It has been resolved in v31: [Staff: fixed bug with referee link check](https://github.com/GibbonEdu/core/pull/2166). Thank you!
