Skip to content

Commit

Permalink
Fixed notices and warning
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.php.net/repository/php/php-benchmarks/trunk@283585 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
hjalle committed Jul 6, 2009
1 parent 7ebf6e0 commit 602f19a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions benchcli/tests/j4p5/jsc.php
Expand Up @@ -601,10 +601,10 @@ function __construct($expr, $code) {
list($this->expr, $this->code) = func_get_args();
}
function emit($w=0) {
if ($this->expr == 0) {
$o = " default:\n";
if (!is_object($this->expr) && $this->expr == 0) {
$o = " default:\n";
} else {
$o = " case (js_bool(jsrt::expr_strict_equal(\$".$this->e.",".$this->expr->emit(1)."))):\n";
$o = " case (js_bool(jsrt::expr_strict_equal(\$".$this->e.",".$this->expr->emit(1)."))):\n";
}
foreach ($this->code as $code) {
$o .= " ".trim(str_replace("\n", "\n ", $code->emit(1)))."\n";
Expand Down
4 changes: 3 additions & 1 deletion benchcli/tests/j4p5/jsrt.php
Expand Up @@ -48,7 +48,9 @@ class jsrt {
static $proto_urierror;

static function start_once() {
if (get_class(jsrt::$global)=="js_object") return;
if (!is_null(jsrt::$global)) {
if (get_class(jsrt::$global)=="js_object") return;
}
jsrt::start();
}

Expand Down

0 comments on commit 602f19a

Please sign in to comment.