Skip to content

Commit b6161c9

Browse files
committed
fix: Set $app if not supplied in getInitialPage()
This fixes double declaration issues such as decribed in horde/kronolith#17
1 parent 18cabbb commit b6161c9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/Horde/Registry.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2097,6 +2097,10 @@ public function getAppDrivers($app, $prefix)
20972097
*/
20982098
public function getInitialPage($app = null)
20992099
{
2100+
if (empty($app)) {
2101+
$app = $this->getApp();
2102+
}
2103+
21002104
try {
21012105
if (($url = $this->callAppMethod($app, 'getInitialPage')) !== null) {
21022106
return $url;
@@ -2110,7 +2114,7 @@ public function getInitialPage($app = null)
21102114

21112115
throw new Horde_Exception(sprintf(
21122116
Horde_Core_Translation::t('"%s" is not configured in the Horde Registry.'),
2113-
is_null($app) ? $this->getApp() : $app
2117+
$app
21142118
));
21152119
}
21162120

0 commit comments

Comments
 (0)