Skip to content

Commit

Permalink
Update functionMap.php
Browse files Browse the repository at this point in the history
Correct return type of the `hash` function. [The PHP docs](https://www.php.net/manual/en/function.hash.php) say that this function always returns a string, however this is not true. It can also return a boolean `false` if you pass in the name of a non-existent hash algorithm. For example:

    var_dump(@hash('foo', 'bar', true));
    bool(false)
  • Loading branch information
Synchro committed Oct 14, 2020
1 parent 7a38424 commit 882a87e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resources/functionMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3906,7 +3906,7 @@
'HaruPage::stroke' => ['bool', 'close_path='=>'bool'],
'HaruPage::textOut' => ['bool', 'x'=>'float', 'y'=>'float', 'text'=>'string'],
'HaruPage::textRect' => ['bool', 'left'=>'float', 'top'=>'float', 'right'=>'float', 'bottom'=>'float', 'text'=>'string', 'align='=>'int'],
'hash' => ['string', 'algo'=>'string', 'data'=>'string', 'raw_output='=>'bool'],
'hash' => ['string|false', 'algo'=>'string', 'data'=>'string', 'raw_output='=>'bool'],
'hash_algos' => ['array'],
'hash_copy' => ['HashContext', 'context'=>'HashContext'],
'hash_equals' => ['bool', 'known_string'=>'string', 'user_string'=>'string'],
Expand Down

0 comments on commit 882a87e

Please sign in to comment.