Skip to content

Commit c14d1e1

Browse files
committed
Fix saucer v8 uri retrieving
1 parent 4e48218 commit c14d1e1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/WebView/WebView.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Boson\Application;
88
use Boson\Component\Http\Request;
99
use Boson\Component\Saucer\SaucerInterface;
10+
use Boson\Component\Uri\Uri;
1011
use Boson\Contracts\EventListener\EventListenerInterface;
1112
use Boson\Contracts\Id\IdentifiableInterface;
1213
use Boson\Contracts\Uri\UriInterface;
@@ -80,7 +81,13 @@ final class WebView implements
8081
* ```
8182
*/
8283
get {
83-
$result = $this->saucer->saucer_webview_url($this->id->ptr);
84+
$result = $this->saucer->saucer_webview_url($this->id->ptr, \FFI::addr(
85+
$error = $this->saucer->new('int'),
86+
));
87+
88+
if ($error->cdata !== 0) {
89+
return new Uri();
90+
}
8491

8592
try {
8693
return Request::castUrl(\FFI::string($result));

0 commit comments

Comments
 (0)