updated the order of parameters of text function

i think $value = null should be the last parameter as its optional