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

format code #2

Merged
merged 1 commit into from
Aug 4, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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