Undefined constant STRIP since update to 3.0.9

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
User avatar
Brf
Support Team Member
Support Team Member
Posts: 51758
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Undefined constant STRIP since update to 3.0.9

Post by Brf » Thu May 24, 2012 4:10 pm

'STRIP' is a constant and has a value, so it is certainly "true".
AmigoJack is just suggesting that you are hardcoding with a true value, so the IF statement is not needed.

Fisch.666
Registered User
Posts: 214
Joined: Sat Jul 30, 2005 10:58 am

Re: Undefined constant STRIP since update to 3.0.9

Post by Fisch.666 » Wed May 30, 2012 6:37 pm

Ah, ok. Good to know. Thanks for this information.

SuperFedya
Registered User
Posts: 248
Joined: Sun Jul 14, 2002 9:14 pm
Contact:

Re: Undefined constant STRIP since update to 3.0.9

Post by SuperFedya » Sun Oct 05, 2014 11:16 pm

What is the best solution?

Replace it with:

Code: Select all

$result = stripslashes($result);
or

Code: Select all

$result = ('STRIP') ? stripslashes($result) : $result;
Thanks

User avatar
AmigoJack
Registered User
Posts: 5599
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Undefined constant STRIP since update to 3.0.9

Post by AmigoJack » Mon Oct 06, 2014 5:39 am

SuperFedya wrote:

Code: Select all

$result = ('STRIP') ? stripslashes($result) : $result;
AmigoJack wrote:That always evaluates to TRUE - you could also write:

Code: Select all

$result = stripslashes($result); 
To put the obvious rubbish into a mathematical identical example:
What is the best?
y = f( x )
or
y = 0 + f( x ) * 1
Here both things lead to the same aswell, where one way is the direct one and the other one full of things that will cause more work but won't change anything to the overall result.
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

Locked

Return to “[3.0.x] Support Forum”