Browse Source

Fix(property): return val

viest 5 years ago
parent
commit
4aa86eda0e
1 changed files with 5 additions and 4 deletions
  1. 5 4
      include/excel.h

+ 5 - 4
include/excel.h

@@ -18,10 +18,11 @@
 #define V_XLS_COF    "config"
 #define V_XLS_PAT    "path"
 
-#define GET_CONFIG_PATH(dir_path_res, class_name, object)                                             \
-    do {                                                                                              \
-        zval *_config  = zend_read_property(class_name, object, ZEND_STRL(V_XLS_COF), 0, NULL);     \
-        (dir_path_res) = zend_hash_str_find(Z_ARRVAL_P(_config), ZEND_STRL(V_XLS_PAT));             \
+#define GET_CONFIG_PATH(dir_path_res, class_name, object)                                          \
+    do {                                                                                           \
+        zval rv;                                                                                   \
+        zval *_config  = zend_read_property(class_name, object, ZEND_STRL(V_XLS_COF), 0, &rv);     \
+        (dir_path_res) = zend_hash_str_find(Z_ARRVAL_P(_config), ZEND_STRL(V_XLS_PAT));            \
     } while(0)
 
 extern zend_class_entry *vtiful_xls_ce;