[TYPO3-mvc] Persistence: Fatal error with question mark in property
Julian Kleinhans
typo3 at kj187.de
Sun Jul 19 20:03:44 CEST 2009
addition:
install blog_example, open the BlogController.php and change line 165
from
$post->setTitle('The Post #' . $postNumber);
to
$post->setTitle('The ? Post #' . $postNumber);
and now, go to the frontend and create some example data!
i hope it helps to better understand the problem
julian
Julian Kleinhans schrieb:
> I have a model and a repository
> I will add some data, so i make a instance from the model and add the
> data via setter and finally send it to the repository.
>
> Example:
>
>
>
> $myModel = t3lib_div::makeInstance('Tx_Tutorials_Domain_Model_Tutorial');
> $myModel->setTitle('My Tutorial');
> $myModel->setSubtitle('This is my first tutorial');
>
> $this->repository->add($myModel);
>
>
>
> ok, thats fine!
> BUT, is there a question mark ? in the title
>
>
> $myModel->setTitle('How are you?');
> $myModel->setSubtitle('This is my first Tutorial');
>
>
> it throws an exception
> (Uncaught exception 'Tx_Extbase_Persistence_Storage_Exception_SqlError')
>
> and the query looks like
>
> ...,"How are you""This is my first tutorial", ...
>
> instead
>
> ...,"How are you", "This is my first tutorial", ...
>
>
>
>
> Issue: http://forge.typo3.org/issues/show/3943
> Hope we can discuss it here :)
>
>
> regards julian kleinhans
More information about the TYPO3-project-typo3v4mvc
mailing list