Skip to content

Commit c92dc6b

Browse files
authored
Fix trying to access array offset on false (#7356)
1 parent a5f41a6 commit c92dc6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Watcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function run()
7777
}
7878
} else {
7979
$ret = exec(sprintf('%s %s/vendor/hyperf/watcher/collector-reload.php %s', $this->option->getBin(), BASE_PATH, $file));
80-
if ($ret['code'] === 0) {
80+
if (isset($ret['code']) && $ret['code'] === 0) {
8181
$this->output->writeln('Class reload success.');
8282
} else {
8383
$this->output->writeln('Class reload failed.');

0 commit comments

Comments
 (0)