Skip to content

Commit

Permalink
This should be unecessary
Browse files Browse the repository at this point in the history
  • Loading branch information
laruence committed Mar 14, 2020
1 parent f2a3740 commit 3d4b923
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions yaf_application.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,19 +178,11 @@ static int yaf_application_parse_option(zval *options) /* {{{ */ {

if (EXPECTED((pzval = zend_hash_str_find(Z_ARRVAL_P(app), ZEND_STRL("library"))) != NULL)) {
if (IS_STRING == Z_TYPE_P(pzval)) {
if (*(Z_STRVAL_P(pzval) + Z_STRLEN_P(pzval)) == DEFAULT_SLASH) {
YAF_G(local_library) = zend_string_init(Z_STRVAL_P(pzval), Z_STRLEN_P(pzval) - 1, 0);
} else {
YAF_G(local_library) = zend_string_copy(Z_STR_P(pzval));
}
YAF_G(local_library) = zend_string_copy(Z_STR_P(pzval));
} else if (IS_ARRAY == Z_TYPE_P(pzval)) {
if ((psval = zend_hash_str_find(Z_ARRVAL_P(pzval),
ZEND_STRL("directory"))) != NULL && Z_TYPE_P(psval) == IS_STRING) {
if (*(Z_STRVAL_P(psval) + Z_STRLEN_P(psval)) == DEFAULT_SLASH) {
YAF_G(local_library) = zend_string_init(Z_STRVAL_P(psval), Z_STRLEN_P(psval) - 1, 0);
} else {
YAF_G(local_library) = zend_string_copy(Z_STR_P(psval));
}
ZEND_STRL("directory"))) != NULL && Z_TYPE_P(psval) == IS_STRING) {
YAF_G(local_library) = zend_string_copy(Z_STR_P(psval));
}
if ((psval = zend_hash_str_find(Z_ARRVAL_P(pzval),
ZEND_STRL("namespace"))) != NULL && Z_TYPE_P(psval) == IS_STRING) {
Expand Down

0 comments on commit 3d4b923

Please sign in to comment.