unexpected back slash

Started by iberan, 15 July 2023, 10:45:02

Previous topic - Next topic

iberan

Hi,

I think there is an unexpected back slash:

/administrator/components/com_abook/views/books/viewhtml.php #40

if (!\count($this->items) && $this->isEmptyState = $this->get('IsEmptyState'))

federica

Hi iberan,
which version of Abook are you using?
I think you are referring to this file administrator/components/com_abook/views/book/view.html.php but the line #40 is totally different.
Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
Informatizzati [url="https://informatizzati.org"]https://informatizzati.org[/url]
Stacca la spina [url="https://disconnessi.org"]https://disconnessi.org[/url]

iberan

So sorry, Federica, this back slash appears in  administrator/components/com_abook/views/books/view.html.php #40

iberan

... and the version is Abook 4.01

federica

I found the line you refers and the backslash.
Which PHP error occurs? My installation does not display any errors.
Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
Informatizzati [url="https://informatizzati.org"]https://informatizzati.org[/url]
Stacca la spina [url="https://disconnessi.org"]https://disconnessi.org[/url]

iberan

No any PHP error occurs, I can't recognize this character only.

federica

It is an escape character useful to call a function.
Joomla core also do that
eg. components/com_contact/helpers/route.php line 16
you can see:
\defined('_JEXEC') or die;)
Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
Informatizzati [url="https://informatizzati.org"]https://informatizzati.org[/url]
Stacca la spina [url="https://disconnessi.org"]https://disconnessi.org[/url]