New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove PHP closing tags #979

Closed
PirataNervo opened this Issue Jul 20, 2014 · 9 comments

Comments

Projects
None yet
4 participants
@PirataNervo
Contributor

PirataNervo commented Jul 20, 2014

18fcbe8#commitcomment-7073774
Quote:

Wouldn't hurt to take the ?> out of most MyBB files entirely...
http://php.net/manual/en/language.basic-syntax.phptags.php
If a file is pure PHP code, it is preferable to omit the PHP closing tag at the end of the file.

@PirataNervo PirataNervo added this to the 1.8.0 milestone Jul 20, 2014

@PirataNervo PirataNervo self-assigned this Jul 20, 2014

@Sama34

This comment has been minimized.

Show comment
Hide comment
@Sama34

Sama34 Jul 20, 2014

Contributor

I think we can do this together with the typecast one, so we can push it in beta 3.

Contributor

Sama34 commented Jul 20, 2014

I think we can do this together with the typecast one, so we can push it in beta 3.

@PirataNervo

This comment has been minimized.

Show comment
Hide comment
@PirataNervo

PirataNervo Jul 20, 2014

Contributor

I can write a script to do this too yes.

Contributor

PirataNervo commented Jul 20, 2014

I can write a script to do this too yes.

@PirataNervo PirataNervo modified the milestones: 1.8 Beta 3, 1.8.0 Jul 20, 2014

@Sama34

This comment has been minimized.

Show comment
Hide comment
@Sama34

Sama34 Jul 20, 2014

Contributor

If a file is pure PHP code [...]

Does it means it wouldn't work if in-line HTML is used? There are some files that do, that should be easy to fix.

Contributor

Sama34 commented Jul 20, 2014

If a file is pure PHP code [...]

Does it means it wouldn't work if in-line HTML is used? There are some files that do, that should be easy to fix.

@euantorano

This comment has been minimized.

Show comment
Hide comment
@euantorano

euantorano Jul 20, 2014

Member

Yes, it does mean that Omar.

I'm completely for this. It is a well known best practise, but I'm sure there used to be a style guideline against it.

On 20 Jul 2014, at 21:54, Omar Gonzalez notifications@github.com wrote:

If a file is pure PHP code

Does it means it wouldn't work if in-line HTML is used? There are some files that do, we can fix that too.


Reply to this email directly or view it on GitHub.

Member

euantorano commented Jul 20, 2014

Yes, it does mean that Omar.

I'm completely for this. It is a well known best practise, but I'm sure there used to be a style guideline against it.

On 20 Jul 2014, at 21:54, Omar Gonzalez notifications@github.com wrote:

If a file is pure PHP code

Does it means it wouldn't work if in-line HTML is used? There are some files that do, we can fix that too.


Reply to this email directly or view it on GitHub.

@Sama34

This comment has been minimized.

Show comment
Hide comment
@Sama34

Sama34 Jul 20, 2014

Contributor

http://docs.mybb.com/Development_Standards.html#PHP_Code_Demarcation

It was decided last year we wouldn't be removing them. But half that page is ignored anyways and there is nothing actually wrong with this, is it?

Contributor

Sama34 commented Jul 20, 2014

http://docs.mybb.com/Development_Standards.html#PHP_Code_Demarcation

It was decided last year we wouldn't be removing them. But half that page is ignored anyways and there is nothing actually wrong with this, is it?

@PirataNervo

This comment has been minimized.

Show comment
Hide comment
@PirataNervo

PirataNervo Jul 20, 2014

Contributor

Yes, some files that contain inline HTML (especially in the ACP). The script I'll create will need to check that.

Contributor

PirataNervo commented Jul 20, 2014

Yes, some files that contain inline HTML (especially in the ACP). The script I'll create will need to check that.

@Sama34

This comment has been minimized.

Show comment
Hide comment
@Sama34

Sama34 Jul 21, 2014

Contributor

I can update those so the script simply removes the endings. I even think this can be done manually :P

It is not like the typecast one that checks for multiple instances.

Contributor

Sama34 commented Jul 21, 2014

I can update those so the script simply removes the endings. I even think this can be done manually :P

It is not like the typecast one that checks for multiple instances.

PirataNervo added a commit that referenced this issue Jul 21, 2014

@PirataNervo

This comment has been minimized.

Show comment
Hide comment
@PirataNervo

PirataNervo Jul 21, 2014

Contributor

This is done.

Contributor

PirataNervo commented Jul 21, 2014

This is done.

@PirataNervo PirataNervo added the fixed label Jul 21, 2014

avril-gh added a commit to avril-gh/mybb that referenced this issue Aug 20, 2014

Remove PHP closing tags #979
PHP closing tags was still created in various places.
@avril-gh

This comment has been minimized.

Show comment
Hide comment
@avril-gh

avril-gh Aug 20, 2014

Contributor

php closing tags still re-created in various places.
#1276

Contributor

avril-gh commented Aug 20, 2014

php closing tags still re-created in various places.
#1276

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment