488 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Won a Competition
  • Referred between 1000 and 1999 users
  • Author had a Free File of the Month
  • Author had a File in an Envato Bundle
  • Bought between 10 and 49 items
+3 more
pixelentity says

We just had a very nasty issue in a recent theme: some buyers complained about “Headers already sent” warning upon theme activation which caused massive boos like getting blank pages, being unable to login or create new pages and so on.

The issue was caused by a single extra (damn) newline char placed after a closing ”?>” in one of the theme classes file but the real question for us was “how the f**k this didn’t happen with any of the multiple wp installations running on different servers/platforms where we had tested theme ?”

So today, after a bit of research, we figure out that when php outbut_buffering option is enabled, you most likely never get a “Headers already sent” warning. We had it enabled in all our php installations like any other buyer not experiencing the issue.

Our friendly advice would be to turn that option off for your testing machine, i don’t know if theme/plugin installation is part of the review process but if it’s the case, reviewers should also disable output buffering.

BF

2815 posts
  • Australia
  • Community Moderator
  • Elite Author
  • Author had a Free File of the Month
  • Most Wanted Bounty Winner
  • Author had a File in an Envato Bundle
  • Has been a member for 5-6 years
  • Contributed a Blog Post
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+10 more
dtbaker Volunteer moderator says

Yep closing PHP tag is generally not used, especially on class files.

see zend coding guide: http://framework.zend.com/manual/1.12/en/coding-standard.php-file-formatting.html#coding-standard.php-file-formatting.general

and php docs say its not required: http://docs.php.net/manual/en/language.basic-syntax.instruction-separation.php

always a touchy point with devs though :)

personally I tend to skip the end closing tag because of a bad hidden white space issue in a utf8 encoded file i had ages ago after transferring it via ftp.

110 posts
  • Australia
  • Has been a member for 2-3 years
  • Sold between 5 000 and 10 000 dollars
  • Exclusive Author
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
AGSoft says

see zend coding guide: http://framework.zend.com/manual/1.12/en/coding-standard.php-file-formatting.html#coding-standard.php-file-formatting.general
“Indentation should consist of 4 spaces. Tabs are not allowed.” Tabs > spaces. :/
3058 posts
  • Community Superstar
  • Has been a member for 6-7 years
  • Won a Competition
  • Sold between 50 000 and 100 000 dollars
  • Bought between 10 and 49 items
  • Referred between 50 and 99 users
  • Exclusive Author
+1 more
wickedpixel says

Hm, I had that error, I repaired it but never knew the real source. Thanks for sharing. :)

4264 posts ThemeForest Reviewer
  • Envato Staff
  • Reviewer
  • Community Moderator
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Venezuela
  • Has been a member for 5-6 years
  • Microlancer Beta Tester
  • Sold between 10 000 and 50 000 dollars
  • Exclusive Author
+9 more
Ivor Reviewer says

I don’t know if theme/plugin installation is part of the review process but if it’s the case, reviewers should also disable output buffering.

I use MAMP and output_buffering is off by default. Thanks for the advice though.

488 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Won a Competition
  • Referred between 1000 and 1999 users
  • Author had a Free File of the Month
  • Author had a File in an Envato Bundle
  • Bought between 10 and 49 items
+3 more
pixelentity says

Yep closing PHP tag is generally not used, especially on class files.
that’s not the only case, it could also happen with BOM headers: some editors just hide them so one won’t notice until buyers start chasing you armed with forks.

BF

by
by
by
by
by
by