0

I am trying to make a condition which does not produces errors in the log.

Tried:

[request.getQueryParams() && request.getQueryParams()['tx_news_pi1'] && request.getQueryParams()['tx_news_pi1']['news'] > 0 && request.getQueryParams()['tx_news_pi1']['news'] in [857,858,913,914]]

and

[traverse(request.getQueryParams(), 'tx_news_pi/news') in [857,858,913,914]]

both give Unable to get an item of non-array

Peter Kraume
  • 3,577
  • 2
  • 21
  • 39
  • 1
    "in the log" does mean what exactly? I tried your (first) condition in a TYPO3 10.4.21 with PHP 7.4.26 and configured with "Development"-preset. It's matching - and does not log anything in "System -> Log" or `var/log/typo3_.log`. – Julian Hofmann Dec 29 '21 at 19:31
  • @JulianHofmann thanks for checking. I found out they put a condition in a systemplate which caused the log entry. This question can be closed. – Jacco van der Post Dec 30 '21 at 08:17

1 Answers1

3

I found out that an old condition still existed in a system template which caused the var/log/typo3_x.log entry. So the condition examples above are good.