Commit:    bbc35b60f9564d556f1c0c154f69108201b4913c
Author:    Felipe Pena <felipe...@gmail.com>         Mon, 11 Nov 2013 22:24:24 
-0200
Parents:   36d2329187074fa9fda2bfbc56c3c4360cd389b5
Branches:  PHP-5.6

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=bbc35b60f9564d556f1c0c154f69108201b4913c

Log:
- Added check for no context file

Changed paths:
  M  phpdbg_prompt.c


Diff:
diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c
index ab04a68..a73459e 100644
--- a/phpdbg_prompt.c
+++ b/phpdbg_prompt.c
@@ -25,6 +25,7 @@
 #include "phpdbg_help.h"
 #include "phpdbg_bp.h"
 #include "phpdbg_opcode.h"
+#include "phpdbg_list.h"
 
 static const phpdbg_command_t phpdbg_prompt_commands[];
 
@@ -430,9 +431,14 @@ static PHPDBG_COMMAND(list) /* {{{ */
        if (zend_is_executing(TSRMLS_C)) {
                filename = zend_get_executed_filename(TSRMLS_C);
                offset = zend_get_executed_lineno(TSRMLS_C);
+       } else if (!filename) {
+               printf("[No file to list]\n");
+               return SUCCESS;
        }
 
        phpdbg_list_file(filename, count, offset);
+
+       return SUCCESS;
 } /* }}} */
 
 static const phpdbg_command_t phpdbg_prompt_commands[] = {


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to