Skip to content
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

Closed
wants to merge 16 commits into from
Closed

[NFR]Add functon getKey for request/file #883

wants to merge 16 commits into from

Conversation

dreamsxin
Copy link
Contributor

fix issues #878 Add functon getKey for request/file
fix bug #821 minify file size is 0

@@ -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;
Copy link

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.

@dreamsxin dreamsxin closed this Jul 19, 2013
@dreamsxin dreamsxin reopened this Jul 19, 2013
@@ -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
Copy link

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);
Copy link

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 😄

@dreamsxin dreamsxin closed this Jul 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants