fix ContextErrorException: Warning: substr() expects parameter 1 to be string
Merge pull request #15 from christophehurpeau/patch-1

fix ContextErrorException: Warning: substr() expects parameter 1 to be s...