From f7cd9712241eb7484cb6e850a22af3e2f0cfc331 Mon Sep 17 00:00:00 2001 From: yuqing Date: Wed, 15 Feb 2017 16:04:06 +0800 Subject: [PATCH] fastcommon_file_put_contents bug fixed --- php-fastcommon/fastcommon.c | 2 +- php-fastcommon/test_file_put_contents.php | 42 ++++++++++++----------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/php-fastcommon/fastcommon.c b/php-fastcommon/fastcommon.c index cfb7330..88bbce0 100644 --- a/php-fastcommon/fastcommon.c +++ b/php-fastcommon/fastcommon.c @@ -1267,7 +1267,7 @@ ZEND_FUNCTION(fastcommon_file_put_contents) args[0] = &zfilename; args[1] = zdata; - args[1] = &zflags; + args[2] = &zflags; args[3] = zcontext; result = zend_call_user_function_wrapper(EG(function_table), NULL, file_put_contents_func, return_value, 4, args TSRMLS_CC); diff --git a/php-fastcommon/test_file_put_contents.php b/php-fastcommon/test_file_put_contents.php index 25e83a5..580d12c 100644 --- a/php-fastcommon/test_file_put_contents.php +++ b/php-fastcommon/test_file_put_contents.php @@ -1,19 +1,21 @@