Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Form Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

custom form giving "...unexpected T_PAAMAYIM_NEKUDOTAYIM in \Controller.php(544) : eval()'d code on line 1" error


Go to End


6 Posts   3708 Views

Avatar
grilldan

Community Member, 135 Posts

3 February 2009 at 9:38pm

Edited: 03/02/2009 9:38pm

I made a widget with an upload form, and when I run it, I get this crazy error. If I'm not mistaken "T_PAAMAYIM_NEKUDOTAYIM" means "dubble dots" which could be ":" or ".." Line 544 on Controller.php reads '$accessPart = eval("return $className::\$allowed_actions;");' And no matter how I modify that line, the error isn't corrected. So I think there is something wrong with my code. I followed the widgets:forms documentation, and used "loadUploaded()" to upload the file.

Do you have any idea what could have caused this?

Avatar
martimiz

Forum Moderator, 1391 Posts

14 February 2009 at 7:37am

Edited: 14/02/2009 7:38am

This message refers to unexpected double colon :: in PHP. This would happen if $classname wasn't set...

Avatar
Sean

Forum Moderator, 922 Posts

14 February 2009 at 12:31pm

Edited: 14/02/2009 12:32pm

Perhaps you could show us your code on pastie.org? :)

Sean

Avatar
grilldan

Community Member, 135 Posts

15 February 2009 at 3:20pm

The code is viewable on another post I made. The error is the same.

http://silverstripe.org/widgets-2/show/253865#post253865

Avatar
ajshort

Community Member, 244 Posts

15 February 2009 at 8:37pm

You need to call parent::__construct() in your GalleryUpload_Controller->__construct() method

Avatar
grilldan

Community Member, 135 Posts

16 February 2009 at 1:37pm

Edited: 16/02/2009 1:39pm

Thank you!!! I've been stuck on this for days. The files are not uploading, but at least that error is gone :D Thank you!

**edit*** the files are going to the "Upload" folder... I need to change that.