On Oct 23, 2008, at 2:10 PM, Jochem Maas wrote:
The order is reversed, so if $host has a non-zero length, it is not
escaped.
first thing that I noticed, second wondering why no charset was
specified,
thirdly was wondering why it's not plain:
$host = htmlentities($host);
but nonetheless
The difference between the examples are still nothing, it do the same.
But I never use the short version of if, because when I look after some month
in some projects I have a better overview when there is a long if , its much
easier to extend.
As explained a couple of times already - there is
On Oct 17, 2008, at 1:58 PM, Lamp Lists wrote:
I'm reading Essential PHP Security by Chris Shiflett.
on the very beginning, page 5 6, if I got it correct, he said this
is not good:
$search = isset($_GET['search']) ? $_GET['search'] : '';
and this is good:
$search = '';
if
On Thu, 2008-10-23 at 11:00 -0400, Chris Shiflett wrote:
On Oct 17, 2008, at 1:58 PM, Lamp Lists wrote:
I'm reading Essential PHP Security by Chris Shiflett.
on the very beginning, page 5 6, if I got it correct, he said this
is not good:
$search = isset($_GET['search']) ?
At 11:00 AM -0400 10/23/08, Chris Shiflett wrote:
On Oct 17, 2008, at 1:58 PM, Lamp Lists wrote:
I'm reading Essential PHP Security by Chris Shiflett.
on the very beginning, page 5 6, if I got it correct, he said
this is not good:
$search = isset($_GET['search']) ? $_GET['search'] : '';
Chris Shiflett schreef:
On Oct 17, 2008, at 1:58 PM, Lamp Lists wrote:
I'm reading Essential PHP Security by Chris Shiflett.
on the very beginning, page 5 6, if I got it correct, he said this
is not good:
$search = isset($_GET['search']) ? $_GET['search'] : '';
and this is good:
On Oct 17, 2008, at 1:58 PM, Lamp Lists wrote:
I'm reading Essential PHP Security by Chris Shiflett.
on the very beginning, page 5 6, if I got it correct, he said this is
not good:
$search = isset($_GET['search']) ? $_GET['search'] : '';
and this is good:
$search = '';
if
OP = original poster (in this case I guess)
http://acronyms.thefreedictionary.com/OP
So it's all about making code readable and probably easier to maintain
(even people unfamiliar with the script).
Doesn't that render the ternary operator IF-statement unnecessary?
Have I been totally wrong using
tedd schreef:
At 6:37 AM -0700 10/20/08, Lamp Lists wrote:
- Original Message
From: tedd [EMAIL PROTECTED]
To: Lamp Lists [EMAIL PROTECTED]; php-general@lists.php.net
Sent: Monday, October 20, 2008 8:25:50 AM
Subject: Re: [PHP] what's the difference in the following code?
At 10
At 2:44 AM -0700 10/21/08, Yeti wrote:
Somebody please tell me that I do not have to rewrite my code base
now, since I care about security.
You do not have to rewrite your code because you use ternary
operators! Nobody said that.
Again, Chris was not saying that it was the use of the
At 10:58 AM -0700 10/17/08, Lamp Lists wrote:
I'm reading Essential PHP Security by Chris Shiflett.
on the very beginning, page 5 6, if I got it correct, he said this
is not good:
$search = isset($_GET['search']) ? $_GET['search'] : '';
and this is good:
$search = '';
if
- Original Message
From: tedd [EMAIL PROTECTED]
To: Lamp Lists [EMAIL PROTECTED]; php-general@lists.php.net
Sent: Monday, October 20, 2008 8:25:50 AM
Subject: Re: [PHP] what's the difference in the following code?
At 10:58 AM -0700 10/17/08, Lamp Lists wrote:
I'm reading Essential PHP
At 6:37 AM -0700 10/20/08, Lamp Lists wrote:
- Original Message
From: tedd [EMAIL PROTECTED]
To: Lamp Lists [EMAIL PROTECTED]; php-general@lists.php.net
Sent: Monday, October 20, 2008 8:25:50 AM
Subject: Re: [PHP] what's the difference in the following code?
At 10:58 AM -0700 10/17/08
On Mon, Oct 20, 2008 at 10:02 AM, tedd [EMAIL PROTECTED] wrote:
I hate it when people take things out of context and misquote others. Chris
did not say that one way was better, or different, than the other. But
rather he used two sets of code to illustrate a point.
Welcome back, Grum-pa.
At 10:12 AM -0400 10/20/08, Daniel Brown wrote:
On Mon, Oct 20, 2008 at 10:02 AM, tedd [EMAIL PROTECTED] wrote:
I hate it when people take things out of context and misquote others. Chris
did not say that one way was better, or different, than the other. But
rather he used two sets of code
- Original Message
From: tedd [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Monday, October 20, 2008 4:15:02 PM
Subject: Re: [PHP] what's the difference in the following code?
At 10:12 AM -0400 10/20/08, Daniel Brown wrote:
On Mon, Oct 20, 2008 at 10:02 AM, tedd [EMAIL
2008/10/17 Lamp Lists [EMAIL PROTECTED]:
I'm reading Essential PHP Security by Chris Shiflett.
on the very beginning, page 5 6, if I got it correct, he said this is not
good:
$search = isset($_GET['search']) ? $_GET['search'] : '';
and this is good:
$search = '';
if
I'm reading Essential PHP Security by Chris Shiflett.
on the very beginning, page 5 6, if I got it correct, he said this is not
good:
$search = isset($_GET['search']) ? $_GET['search'] : '';
and this is good:
$search = '';
if (isset($_GET['search']))
{
$search = $_GET['search'];
}
I'm reading Essential PHP Security by Chris Shiflett.
on the very beginning, page 5 6, if I got it correct, he said this is not
good:
$search = isset($_GET['search']) ? $_GET['search'] : '';
and this is good:
$search = '';
if (isset($_GET['search']))
{
$search = $_GET['search'];
On Fri, Oct 17, 2008 at 1:58 PM, Lamp Lists [EMAIL PROTECTED] wrote:
I'm reading Essential PHP Security by Chris Shiflett.
on the very beginning, page 5 6, if I got it correct, he said this is not
good:
$search = isset($_GET['search']) ? $_GET['search'] : '';
and this is good:
$search
20 matches
Mail list logo