diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 29fa4724a30..b5e3165a4ec 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -465,7 +465,7 @@ void ODBC_SQL_ERROR(HENV henv, HDBC conn, HSTMT stmt, char *func) ODBCLS_FETCH(); do { - SQLError(henv, conn, stmt, state, + ret = SQLError(henv, conn, stmt, state, &error, errormsg, sizeof(errormsg)-1, &errormsgsize); if (func) { php_error(E_WARNING, "SQL error: %s, SQL state %s in %s", diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 981de172120..a9246e8fc27 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -113,6 +113,8 @@ function_entry basic_functions[] = { PHP_FE(phpinfo, NULL) PHP_FE(phpversion, NULL) PHP_FE(phpcredits, NULL) + PHP_FE(php_logo_guid, NULL) + PHP_FE(zend_logo_guid, NULL) PHP_FE(strspn, NULL) PHP_FE(strcspn, NULL) diff --git a/ext/standard/info.c b/ext/standard/info.c index 69a9d2791c2..29334820061 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -510,6 +510,18 @@ PHP_FUNCTION(phpcredits) /* }}} */ + +PHP_FUNCTION(php_logo_guid) +{ + RETURN_STRINGL(PHP_LOGO_GUID, sizeof(PHP_LOGO_GUID)-1, 1); +} + + +PHP_FUNCTION(zend_logo_guid) +{ + RETURN_STRINGL(ZEND_LOGO_GUID, sizeof(ZEND_LOGO_GUID)-1, 1); +} + /* * Local variables: * tab-width: 4 diff --git a/ext/standard/info.h b/ext/standard/info.h index 627accf2131..72aadf72ee4 100644 --- a/ext/standard/info.h +++ b/ext/standard/info.h @@ -52,9 +52,14 @@ #define PHP_CREDITS_FULLPAGE (1<<3) #define PHP_CREDITS_ALL 0xFFFFFFFF +#define PHP_LOGO_GUID "PHPE9568F34-D428-11d2-A769-00AA001ACF42" +#define ZEND_LOGO_GUID "PHPE9568F35-D428-11d2-A769-00AA001ACF42" + PHP_FUNCTION(phpversion); PHP_FUNCTION(phpinfo); PHP_FUNCTION(phpcredits); +PHP_FUNCTION(php_logo_guid); +PHP_FUNCTION(zend_logo_guid); PHPAPI void php_print_info(int flag); PHPAPI void php_print_credits(int flag); diff --git a/main/main.c b/main/main.c index e2ba3fb2d0e..62cd683dc03 100644 --- a/main/main.c +++ b/main/main.c @@ -1224,13 +1224,13 @@ PHPAPI void php_execute_script(zend_file_handle *primary_file CLS_DC ELS_DC PLS_ if (SG(request_info).query_string && SG(request_info).query_string[0]=='=' && PG(expose_php)) { - if (!strcmp(SG(request_info).query_string+1, "PHPE9568F34-D428-11d2-A769-00AA001ACF42")) { + if (!strcmp(SG(request_info).query_string+1, PHP_LOGO_GUID)) { char *header_line = estrndup(CONTEXT_TYPE_IMAGE_GIF, sizeof(CONTEXT_TYPE_IMAGE_GIF)); php4i_add_header_information(header_line, sizeof(CONTEXT_TYPE_IMAGE_GIF)-1); PHPWRITE(php4_logo, sizeof(php4_logo)); return; - } else if (!strcmp(SG(request_info).query_string+1, "PHPE9568F35-D428-11d2-A769-00AA001ACF42")) { + } else if (!strcmp(SG(request_info).query_string+1, ZEND_LOGO_GUID)) { char *header_line = estrndup(CONTEXT_TYPE_IMAGE_GIF, sizeof(CONTEXT_TYPE_IMAGE_GIF)); php4i_add_header_information(header_line, sizeof(CONTEXT_TYPE_IMAGE_GIF)-1);