Skip to content

Commit f0ea66f

Browse files
committed
Fix Segmentation fault: OnUpdateString->OnUpdateStringUnempty .
1 parent 33ba0c2 commit f0ea66f

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212

1313
```shell
1414
$ git clone https://github.com/cdoco/hashids.phpc.git
15-
$ phpize
16-
$ ./configure
17-
$ make && make install
15+
$ cd hashids.phpc && phpize && ./configure && make && make install
1816
```
1917

2018
you can set some options in php.ini, or set in the constructor.

hashids.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo__construct, 0, 0, 3)
3939
ZEND_END_ARG_INFO()
4040

4141
PHP_INI_BEGIN()
42-
STD_PHP_INI_ENTRY("hashids.salt", HASHIDS_DEFAULT_SALT, PHP_INI_ALL, OnUpdateString, salt, zend_hashids_globals, hashids_globals)
42+
STD_PHP_INI_ENTRY("hashids.salt", HASHIDS_DEFAULT_SALT, PHP_INI_ALL, OnUpdateStringUnempty, salt, zend_hashids_globals, hashids_globals)
4343
STD_PHP_INI_ENTRY("hashids.min_hash_length", "0", PHP_INI_ALL, OnUpdateLong, min_hash_length, zend_hashids_globals, hashids_globals)
44-
STD_PHP_INI_ENTRY("hashids.alphabet", HASHIDS_DEFAULT_ALPHABET, PHP_INI_ALL, OnUpdateString, alphabet, zend_hashids_globals, hashids_globals)
44+
STD_PHP_INI_ENTRY("hashids.alphabet", HASHIDS_DEFAULT_ALPHABET, PHP_INI_ALL, OnUpdateStringUnempty, alphabet, zend_hashids_globals, hashids_globals)
4545
PHP_INI_END()
4646

4747
/* branch prediction hinting */

0 commit comments

Comments
 (0)