namespace classname are not properly escaped; breaks TYPO3 7.6 with PHP 7
albig opened this issue · 0 comments
albig commented
The following exception is thrown with TYPO3 7.6 running PHP 7.0:
#1420281366: $className "\EWW\Dpf\Domain\Model\Document" must not start with a backslash.
In this extension this happens multiple times. Always on iinstantiating with makeInstance or the objectmanager->get(). Sometimes leading backslashes are used, sometimes single quotes, sometimes double quotes.
The error is
- leading backslash
- no escaping of backslashes in strings (see http://www.php.net/manual/en/language.namespaces.faq.php#language.namespaces.faq.quote)
Proposal:
- replace all strings by new PHP (>5.5) "::class" notation
- e.g. objectmanager->get(\EWW\Dpf\Domain\Model\Document::class)
- With or without leading backslash is working. In many examples it is with leading backslash. Maybe someone can tell me the difference