Drupal 7 says: PHP 5.2.5 or higher (5.3 recommended). I use php-5.2.17-jason.2 (Utter Ramblings), PHP 5.2 doesn't support closures.

PHP Parse error: syntax error, unexpected T_FUNCTION in /etc/drupal7/all/modules/textimage/textimage.module on line 490

CommentFileSizeAuthor
#1 textimage-fix_parse_error-1813592-1.patch865 bytesmondrake

Comments

mondrake’s picture

Priority: Normal » Major
Status: Active » Needs review
StatusFileSize
new865 bytes

Sorry for that. Patch attached, please review and test.

erald’s picture

Tested it and the error is gone however all my images are gone also.
Flushing (several times) and cleaning cache(several times) did not help. Images were not displayed anymore.
The only errors I found in the log is:
Warning: array_pop(): The argument should be an array in textimage_image_from_preset() (line 508 of /sites/all/modules/textimage/textimage.module).

When rolling back to version "7.x-2.0-alpha2+4-dev" everything works.

Sorry not to be more informative but simply have not the time to investigate further. If I have more will be back on this.

mondrake’s picture

Thanks for reporting.

Are you using 'Uppercase Words' option for Convert to case?

I could not reproduce, sorry. anyone else??

picxelplay’s picture

Just enabled 7.x-2.0-beta1 on a fresh install of D 7.14 and got the same error.

mondrake’s picture

Ok. Can you try the patch in #1, or else I can commit it to dev and you could try with the dev package tomorrow?

The reason I haven't committed it yet is in #2 erald reported losing the images with the patch, so I need more reviews before proceeding.

mondrake’s picture

On more general terms, I am trying to establish a proper patch review process for branch 7.x-2.x.

Please see Status settings for an issue.

Can anybody help by reviewing patch #1 and provide feedback?

wundo’s picture

Status: Needs review » Fixed

It worked for me, committing!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.