Re: [symfony-users] about the 'return null' issue in php

2011-03-26 Thread Lixin Yu
Thank you for you reply. I've discussed this topic with people in #symfony-dev channel on Freenode, and get answer from there. Symfony is doing things right, it's just some of my misunderstanding. :) On Thu, Mar 24, 2011 at 10:03 PM, Jeremiah Dodds wrote: > > > On Tue, Mar 22, 2011 at 11:35 PM

Re: [symfony-users] about the 'return null' issue in php

2011-03-24 Thread Jeremiah Dodds
On Tue, Mar 22, 2011 at 11:35 PM, Lixin Yu wrote: > > So, is 'return null' a good/bad practice in php? > If you return null consistently as a "none" value, it's not a bad one. If you're inconsistent about it, or if you use it in places where it wouldn't make much sense, it would be a bad one. D

[symfony-users] about the 'return null' issue in php

2011-03-24 Thread Lixin Yu
Hello, I just read the Book <>. It mentioned that 'return null' is a bad coding practice. But I see many 'return null' in symfony generated code. ( for example: doSelectOne() function. ) So, is 'return null' a good/bad practice in php? -- *Never say die* -- If you want to report a vulnerabil