Throw an exception when the $key argument to hash_hmac is not a string
authorGergő Tisza <tgr.huwiki@gmail.com>
Thu, 24 Mar 2016 18:22:45 +0000 (19:22 +0100)
committerGergő Tisza <tgr.huwiki@gmail.com>
Thu, 24 Mar 2016 19:54:54 +0000 (20:54 +0100)
commitf15faf646371e13c9fd0acaf066f153965440648
tree267fb997c6a0c78b4e8000ac146fb3dbdf5c206e
parent718f3f78b583a473035f39a8c46e0a9829d2e0bf
Throw an exception when the $key argument to hash_hmac is not a string

HHVM throws a fatal error when $key is not a string (unlike $data which
is typecast), so we might as well as throw an exception so that
at least we have a stack trace.

Bug: T126316
Change-Id: Iad9a499b51647c7dbcd58e9ab7ac8e8cb6359bba
includes/utils/MWCryptHash.php