Bug #31087

Uncaught Exception: invalid annotation

Added by Julian Kleinhans over 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Reflection
Target version:
-
Start date:
2011-10-19
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

I get a totally strange exception

Uncaught Exception The @var annotation for "Kj187\Tutorials\Domain\Model\Category::$context" seems to be invalid. More Information Exception code #1284132314 File /Volumes/Server/data/htdocs/privat/tutorials3/Packages/Framework/TYPO3.FLOW3/Classes/Reflection/ReflectionService.php Exception reference #20111019001416e73202 

Here is the Category::$context

    /**
     * @var string
     * @FLOW3\Identity
     */
    protected $context;

after a little debug session i found the reason.
The problem is the optional second trim parameter in ReflectionService.php line 1119

$declaredType = trim(implode(' ', $this->getPropertyTagValues($className, $propertyName, 'var')), ' \\');

My PHP version is 5.3.8 and i use apache2 on a mac os x system based on mac ports

It works if i remove the second param, or if i wrap this line with a second trim function

$declaredType = trim(trim(implode(' ', $this->getPropertyTagValues($className, $propertyName, 'var')), ' \\'));

any ideas ?
discussion ?

or shoud i write this as a patch ?


Related issues

Related to TYPO3.Flow - Bug #32466: Strange exception: Invalid annotationResolvedKarsten Dambekalns2011-12-12

Actions
#1

Updated by Karsten Dambekalns about 9 years ago

  • Target version deleted (1.0.0)
#2

Updated by Julian Kleinhans about 9 years ago

i have resolved the problem
The file was damage..

copy content, delete file, create new file, paste content and all works

#3

Updated by Julian Kleinhans about 9 years ago

someone can close this issue please

#4

Updated by Christian Müller about 9 years ago

  • Status changed from New to Closed

Great!

Also available in: Atom PDF