Skip to content

Commit

Permalink
Merge pull request #2 from stuartjing/master
Browse files Browse the repository at this point in the history
format code
  • Loading branch information
rryqszq4 committed Aug 4, 2016
2 parents 713f5c0 + 3f64ae1 commit 5f4553c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/ngx_http_php_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ void ngx_http_php_code_register_server_variables(zval *track_vars_array TSRMLS_D
server_address.len = NGX_SOCKADDR_STRLEN;
server_address.data = server_addr;
if (ngx_connection_local_sockaddr(r->connection, &server_address, 0) != NGX_OK) {

}
php_register_variable_safe("SERVER_ADDR", (char *)server_address.data, server_address.len, track_vars_array TSRMLS_CC);

Expand Down
6 changes: 2 additions & 4 deletions src/php/php_ngx_location.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,7 @@ PHP_METHOD(ngx_location, capture)
char *uri_str;
int uri_len;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &uri_str, &uri_len) == FAILURE)
{
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &uri_str, &uri_len) == FAILURE){
return ;
}

Expand Down Expand Up @@ -366,8 +365,7 @@ PHP_METHOD(ngx_location, capture_multi)
zval *uri_arr;
zval *result;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", &uri_arr) == FAILURE)
{
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", &uri_arr) == FAILURE){
return ;
}

Expand Down
3 changes: 1 addition & 2 deletions src/php/php_ngx_socket_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ PHP_METHOD(ngx_socket_tcp, connect)
int host_len, port;
zval *options = NULL;

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|la", &host_str, &host_len, &options) == FAILURE)
{
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|la", &host_str, &host_len, &options) == FAILURE){
RETURN_NULL();
}
}
Expand Down
1 change: 1 addition & 0 deletions travis/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ if [ $? -eq 0 ];then
echo "nginx install ... done"
echo "ngx_php compile success."
else
echo "ngx_php compile failed.Contact author.You can Join QQ 558795330(ngx_php) ."
exit 1
fi
#echo "nginx install ... done"
Expand Down
1 change: 1 addition & 0 deletions utils/test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
#init path
export PATH=/usr/local/nginx_php_dev/sbin:$PATH
cd /usr/local/nginx_php_dev/
prove -r t

0 comments on commit 5f4553c

Please sign in to comment.