]> granicus.if.org Git - php/commitdiff
Say FIXME to non function calls and non TSRM builds. Both will currentls
authorMarcus Boerger <helly@php.net>
Thu, 8 Aug 2002 19:36:49 +0000 (19:36 +0000)
committerMarcus Boerger <helly@php.net>
Thu, 8 Aug 2002 19:36:49 +0000 (19:36 +0000)
not show a default reference.

main/main.c

index 13750468f211d2f413b2633c7d87af06c08d90d9..8a5b0fdb11d66a749a521e0e72dd3b22cc5fc678 100644 (file)
@@ -390,15 +390,20 @@ PHPAPI int php_printf(const char *format, ...)
 /* {{{ php_verror */
 PHPAPI void php_verror(const char *docref, const char *params, int type, const char *format, va_list args TSRMLS_DC)
 {
-       char *buffer = NULL, *docref_buf = NULL, *p;
+       char *buffer = NULL, *docref_buf = NULL, *function, *p;
        
        vspprintf(&buffer, 0, format, args);
        if (buffer) {
                if (!docref) {
-                       spprintf(&docref_buf, 0, "function.%s%s", get_active_function_name(TSRMLS_C), PG(docref_ext));
-                       if (docref_buf) {
-                               while((p=strchr(docref_buf, '_'))!=NULL) *p = '-';
-                               docref = docref_buf;
+                       function = get_active_function_name(TSRMLS_C);
+                       if (function) {
+                               spprintf(&docref_buf, 0, "function.%s%s", function, PG(docref_ext));
+                               if (docref_buf) {
+                                       while((p=strchr(docref_buf, '_'))!=NULL) *p = '-';
+                                       docref = docref_buf;
+                               }
+                       } else {
+                               /* FIXME: need to handle non function calls and non TSRM builds here */
                        }
                }
                if (docref) {