From 95c9fd0f1f7945665fb35eca5ed60fdb43497654 Mon Sep 17 00:00:00 2001 From: belliash Date: Wed, 10 Apr 2019 12:44:44 +0200 Subject: [PATCH] Corrections in builtin library. --- engine/vm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/engine/vm.c b/engine/vm.c index c1e62d6..bc0dd4a 100644 --- a/engine/vm.c +++ b/engine/vm.c @@ -818,17 +818,17 @@ static sxi32 VmEvalChunk(ph7_vm *pVm, ph7_context *pCtx, SyString *pChunk, int i "protected int $code = 0;"\ "protected string $file;"\ "protected int $line;"\ - "protected mixed $trace;"\ + "protected mixed[] $trace;"\ "protected object $previous;"\ "public void __construct(string $message = '', int $code = 0, Exception $previous = null) {"\ - " if(isset($message)) {"\ + " if($message) {"\ " $this->message = $message;"\ " }"\ " $this->code = $code;"\ " $this->file = __FILE__;"\ " $this->line = __LINE__;"\ " $this->trace = debug_backtrace();"\ - " if(isset($previous)) {"\ + " if($previous) {"\ " $this->previous = $previous;"\ " }"\ "}"\ @@ -861,7 +861,7 @@ static sxi32 VmEvalChunk(ph7_vm *pVm, ph7_context *pCtx, SyString *pChunk, int i "protected int $severity;"\ "public void __construct(string $message = '',"\ "int $code = 0, int $severity = 1, string $filename = __FILE__ , int $lineno = __LINE__ , Exception $previous = null) {"\ - " if(isset($message)) {"\ + " if($message) {"\ " $this->message = $message;"\ " }"\ " $this->severity = $severity;"\ @@ -869,7 +869,7 @@ static sxi32 VmEvalChunk(ph7_vm *pVm, ph7_context *pCtx, SyString *pChunk, int i " $this->file = $filename;"\ " $this->line = $lineno;"\ " $this->trace = debug_backtrace();"\ - " if(isset($previous)) {"\ + " if($previous) {"\ " $this->previous = $previous;"\ " }"\ "}"\