[Solar-talk] Is it just me or is Paul going to kill me? If second value is 0 controller doesn't find it

Kilbride, James P. James.Kilbride at gd-ais.com
Fri May 2 11:42:57 CDT 2008


Here's my url: http://localhost:8080/Solar/Matrix/update/1/0

(Solar part of the url is just because it's not at the base level.
Matrix is the controller, update is the action.) 

See the action code below:

	function actionUpdate($matrix_id, $display)

so far so good. If the url is :
http://localhost:8080/Solar/Matrix/update/1/1 

I have no problems. everything works as god, or ra, intended.

if it's 0 though I get this:

Warning: Missing argument 2 for
ProcedureMatrix_App_Matrix::actionUpdate() in
C:\Solar\ProcedureMatrix\App\Matrix.php on line 73

What I'm trying to do is put a boolean(0/1) on the query string to
toggle some information. Unfortunately if you do 'true' / 'false' php
registers bool 'false' as being true. So I to use 0 which evaluates to
false. Or do a string compare against false and set the variable to
false if string equals false. I'd rather not do a string compare against
false if i can but I will if I have to. Personally though you may not
always be able to do that if you need the number 0 for something so why
is it that the 0 causes things to fail? is this a bug?
James Kilbride
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman-mail3.webfaction.com/pipermail/solar-talk/attachments/20080502/3ffc45d4/attachment.html


More information about the Solar-talk mailing list