Hi,

After updating to latest .dev I got;

Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in _zurb_foundation_load() (line 20 of /sites/all/themes/zurb-foundation/template.php).

greetings, Martijn

Comments

@Martijn: Are you using php 5.2 ?

Hi,
Yes I am using PHP 5.2.4

Greetings, Martijn

Status:Active» Needs review

Martijn:

Thanks for reporting this. I went ahead and committed a fix. Let me know if solves your issue by performing an update to the latest version. I'm pretty confident it will.

Commit:
http://drupalcode.org/project/zurb-foundation.git/commit/cb276e3cf583ef5...

FYI: For those who are googling this issue; __DIR__ is a magic constant only supported in php 5.3 +.

The workaround didn't work for me but manual replacement of "__DIR__" to "__FILE__" did the trick. Thanks.

Assigned:Unassigned» chrisjlee

Thanks. work on find another solution.

Status:Needs review» Needs work

...

According to the PHP documentation, defined() and define() take a string for the constant; I'm attaching a patch to fix that.

StatusFileSize
new515 bytes

Attaching file missing on previous comment.

Hi, #8 worked for me on PHP 5.2.4 !
greetings, Martijn

For the record, based on http://drupal.org/requirements 5.3 is recommended and some modules require 5.3 so I don't think it's unreasonable to have a theme require 5.3 and Drupal 8 will require 5.3.

July 22 2010 per http://www.php.net/archive/2010.php#id2010-07-22-1

This release marks the end of the active support for PHP 5.2. Following this release the PHP 5.2 series will receive no further active bug maintenance. Security fixes for PHP 5.2 might be published on a case by cases basis. All users of PHP 5.2 are encouraged to upgrade to PHP 5.3.

Status:Needs work» Closed (won't fix)
StatusFileSize
new559 bytes

I went ahead and actually removed the work around. Commit: http://drupalcode.org/project/zurb-foundation.git/commit/3d7b46c

For those who want to continue to use the zurb theme but are still using php 5.2, attached is a rerolled patch.

Thanks @jedihe for the patch.

I also updated the project page to inform of the requirements and the patch that is available for the time being.

Weird occurrence for me, my fault, I set the PHP version back and removed a php.ini file from the root thinking it wasn't needed - turns out I was wrong, a few hours later.... I tried uninstalling and reinstalling twice, I was getting this exact error - using 1&1 shared hosting - turns out Global PHP settings to 5.4 was the 1st step to fixing this, the 2nd was setting Local PHP settings to 5.4 (New Local PHP Version) and apply it to the root directory, no error no more.

Thanks for your helpful report DylanThomas!

Too much coffee if I recall!

Status:Closed (won't fix)» Closed (duplicate)

This actually got committed a while ago: #2001046: Don't require PHP 5.3

Marking as duplicate.