addon crashes on PHP version >= 5.4

i used a deprecated syntax in one function, which has been removed in
PHP version 5.4