Hmm. Just spotted some server errors in my logs, which I think were caused by my attempts at this conditional. This was when I tried it with quotation marks around the expression:
Code:
Server Error Log
Error Info
ErrorException: Fatal Error: syntax error, unexpected '.', expecting '}' - library/WidgetFramework/WidgetRenderer.php(482) : runtime-created function:1
Generated By: test, 25 minutes ago
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
["url"] => string(58) "http://www.mydomain.com/xf/index.php?members/test.84/"
["_GET"] => array(1) {
["members/test_84/"] => string(0) ""
}
["_POST"] => array(0) {
}
}
And this is the error when I used it without quotation marks:
Code:
Server Error Log
Error Info
ErrorException: Fatal Error: syntax error, unexpected '{' - library/WidgetFramework/WidgetRenderer.php(482) : runtime-created function:1
Generated By: test, 28 minutes ago
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
["url"] => string(58) "http://www.mydomain.com/xf/index.php?members/test.84/"
["_GET"] => array(1) {
["members/test_84/"] => string(0) ""
}
["_POST"] => array(0) {
}
}
Which makes me wonder, should I just substitute the curly brackets for square brackets, I wonder? I might try that later if I'm feeling brave!