-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NFR]Add functon getKey for request/file #883
Conversation
@@ -86,16 +87,19 @@ | |||
*/ | |||
PHP_METHOD(Phalcon_Http_Request_File, __construct){ | |||
|
|||
zval *file, *name, *temp_name, *size, *type; | |||
zval *file, *key, *name, *temp_name, *size, *type; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since key
is the optional parameter, it must be initialized with NULL
(zval *key = NULL
); otherwise, if the key is not supplied, the variable will contain garbage and phalcon_update_property_this
won't be happy.
@@ -1125,11 +1128,12 @@ | |||
PHALCON_INIT_NVAR(error); | |||
ZVAL_BOOL(error, 1); | |||
} | |||
if (!zend_is_true(error)) { | |||
if (Z_TYPE_P(error) == IS_ARRAY) { | |||
// TODO: Waiting for Superman to perfect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be fixed in #888
phalcon_array_append(&files, request_file, PH_SEPARATE); | ||
Z_ADDREF_PP(hd); | ||
phalcon_call_method_p2_noret(request_file, "__construct", *hd, key); | ||
phalcon_array_append(&return_value, request_file, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has also been implemented in #888 😄
fix issues #878 Add functon getKey for request/file
fix bug #821 minify file size is 0