tractorcow / silverstripe-dynamiccache

Simple on the fly caching of dynamic content for Silverstripe
39 stars 27 forks source link

the used yield is a resereved keyword in PHP 5.5 #19

Closed bobkosse closed 10 years ago

bobkosse commented 10 years ago

The module crashes on PHP 5.5 with the following error:

Parse error: syntax error, unexpected 'yield' (T_YIELD), expecting identifier (T_STRING) in [path]\dynamiccache\code\DynamicCache.php on line 118

yield is in PHP 5.5 a reserved keyword. You can fix this by change the protected function name yield() to yieldContent() - and offcourse the calls to that function.

tractorcow commented 10 years ago

Thanks for the heads up... here's me still using the lowly PHP 5.3 and 5.4.

tractorcow commented 10 years ago

Fixed with https://github.com/tractorcow/silverstripe-dynamiccache/commit/b9737a57f62191661d0fa517053cdd75751ff8a9