View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Supportez nous sur Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - Request handling - Page 2 - ProjeQtOr

Prochaines Sessions

Les prochaines formations et démonstrations sont ouvertes, inscrivez-vous rapidement !

 

Démonstration de ProjeQtOr

(gratuit, sur inscription)
 

13 mai 2025 (10h30-12h)

5 juin 2025 (16h-17h30)

 
 

Planifiez avec ProjeQtOr

14 et 15 mai 2025 (9h-12h30)

18 et 19 juin 2025 (9h-12h30)

 
 

Administrez avec ProjeQtOr

20 et 21 mai (9h-12h30)

25 et 26 juin (9h-12h30)

 

 

 

Request handling

More
25 Mar 2017 16:30 #7 by babynus
Replied by babynus on topic Request handling
I took your work into account.
Thanks !

Babynus
Administrator of ProjeQtOr web site

Please Connexion or Create an account to join the conversation.

More
27 Mar 2017 09:06 #8 by antonio.grr
Replied by antonio.grr on topic Request handling
I notice now that you used a different signature in RequestHandler in order to distinguish between optional and mandatory parameters in Request.
I used $default = 'none' so missing argument can be easily detected to assume that parameter is mandatory.
If you really prefer your approach, you should use $required=true as it refers to the condition of accessing $_REQUEST element with no previous isset test.
This is, for example, what happened in original getSingleElement.php code; using my version and $required=false, exception will be avoided, but I'm not sure that you really want this.
Let me know before I proceed supplying you other code.
Best Regards

Please Connexion or Create an account to join the conversation.

More
27 Mar 2017 14:49 #9 by babynus
Replied by babynus on topic Request handling

I used $default = 'none' so missing argument can be easily detected to assume that parameter is mandatory.

I prefer the explicit $required parameter, because 'none' is a string and could be a possible default value.

If you really prefer your approach, you should use $required=true as it refers to the condition of accessing $_REQUEST element with no previous isset test.

You're right. I prefered the default to false because it would not raise "Hack Detected" when not necessary. But in the other hand it will not when nedded...
I think best is to set signature as
getValue($code,$required,$default=null)
with no default value for $required.
This way, we'll have to think about need for a required Request attribute or not.
I'll keep existing signature until sure all calls have been upgraded...

Babynus
Administrator of ProjeQtOr web site

Please Connexion or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.033 seconds

Paramétrages de cookies

×

Cookies fonctionnels

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Veuillez vous connecter pour voir vos activités!

Autres cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.