Skip to content

Commit f50d3e3

Browse files
committed
Test fix
1 parent a754379 commit f50d3e3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tests/CPClientTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,9 @@ public function testGetUser(): void
301301
"status": "ACTIVE",
302302
"vatNumber": null
303303
}
304+
"wptIsPreviewEnabled": {
305+
"enabled": false
306+
}
304307
}
305308
}');
306309
$host = "http://webpagetest.org";

www/templates/layouts/includes/wpt-header.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function addTab($tabName, $tabUrl, $addClass = '')
5050
$is_logged_in = Util::getSetting('cp_auth') && (!is_null($request_context)) && (!is_null($request_context->getClient()) && $request_context->getClient()->isAuthenticated());
5151
$user = !is_null($request_context) ? $request_context->getUser() : null;
5252

53-
if ($request_context->isReadOnly()) {
53+
if (isset($request_context) && $request_context->isReadOnly()) {
5454

5555
?>
5656
<wpt-header style='margin-bottom: -1rem;'>

0 commit comments

Comments
 (0)