-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TASK: servername auch im title tag im backend fragment ergänzt #132
TASK: servername auch im title tag im backend fragment ergänzt #132
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hier müsste man noch prüfen, ob YRewrite installiert ist und wenn ja, dann dessen Titel ausgeben.
Ist gerade bei Multidomain wichtig.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ungetestet, lgtm
fragments/maintenance/backend.php
Outdated
<title>Maintenance</title> | ||
<title> | ||
<?php | ||
if (rex_addon::get('yrewrite')->isAvailable() && rex_yrewrite::getCurrentDomain()->getName() !== '') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (rex_addon::get('yrewrite')->isAvailable() && rex_yrewrite::getCurrentDomain()->getName() !== '') { | |
if (rex_addon::get('yrewrite')->isAvailable() && rex_yrewrite::getCurrentDomain()->getName() !== null) { |
@alxndr-w Wir hatten es Ja neulich im Slack darüber ob getName()
auch Null zurückgeben kann. Dann würde es eventuell sinn machen, anstatt auf leer, auf null
zu prüfen.
Wie siehst du das?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (rex_addon::get('yrewrite')->isAvailable() && rex_yrewrite::getCurrentDomain()->getName() !== '') { | |
if (rex_addon::get('yrewrite')->isAvailable() && rex_yrewrite::getCurrentDomain() !== null && rex_yrewrite::getCurrentDomain()->getName() !== '') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oder so.. doppelt hält besser ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So meinte ich. Du musst sicherstellen, dass bei rex_yrewrite::getCurrentDomain()
auch wirklich ein Objekt zurückkommt, bevor du die Methode ->getName()
ausführen kannst.
Bzw. es gibt auch noch eine andere Schreibweise:
rex_yrewrite::getCurrentDomain()?->getName()
^
ich weiß nicht, ob die bereits in PHP 8.1 verfügbar ist. Hier könntest du mal recherchieren:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kam wohl mit PHP 8.0 hinzu: https://php.watch/versions/8.0/null-safe-operator
Dann gibt es diese auch mit PHP 8.1 und Höher.
Co-authored-by: Alexander Walther <[email protected]>
7c3307e
to
aeae8a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
…le-tag-eingebunden
Beschreibung / Description
Ergänzt denn Servernamen der Seite noch im Fragment für die Wartungsmodusmaske im Backend.