Look at this piece of code:

$a = 1;
$b = 0;

if ($a == true) echo "I am true"
if ($b == false) echo "I am false"

results in "I am true" and "I am false" both being echoed.

However:
if ($a === true) echo "I am true"
if ($b === false) echo "I am false"

does not

On Fri, Apr 23, 2010 at 11:15 AM, Tofuwarrior <p...@clearintent.co.uk> wrote:
> Hi all,
>
> I guess this is simple lack of understanding but it is a bit peculiar.
> Any insights, answers pointers to further readng gratefully received.
>
> I haven't found any answers in the docs anywhere.
>
> In my app,
>
> this
> .com/folder/tree/id      creates request variable id=boolean(true)
> whereas this
> .com/folder/tree/id/     creates request variable id=empty string
>
> I am doing retrievebyPK($request->getParameter('id')) and  the version
> that returns true means that this retrieves the record with PK ==1
> which i absolutely don't want.
>
> Any idea what i am doing wrong? I figure it must be to do with routing
> or is there an error with retrieveByPK - should it know the diff
> between true and 1, I guess it evaluates to the same but should it
> really work like that?
>
> My routing is the default stuff as follows, I have other rules but
> nothing relevant to folder
> default_index:
>  url:   /:module
>  param: { action: index }
>
> default:
>  url:   /:module/:action/*
>
>
> Thanks,
>
> TW
>
> --
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to