I would strongly recommend to upgrade, rather to hack code of a very, very, very, very old version of Limesurvey that is not supported anymore and has not received security updates in a long time.
Help us to help you!
Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.