[PHP-DEV] Fatal error: Call to a member function on a non-object

2008-11-17 Thread Christopher Vogt
Hej, I use PHP 5.2.6. I am refactoring some code to use more object-orientation. I encounter a problem, where the new object-oriented version results in a fatal error, where the old array-oriented version didn't. I fetch records a database. Sometime it happens that a record does not exist

Re: [PHP-DEV] Fatal error: Call to a member function on a non-object

2008-11-17 Thread Kalle Sommer Nielsen
Hi 2008/11/17 Christopher Vogt [EMAIL PROTECTED]: Hej, I use PHP 5.2.6. I am refactoring some code to use more object-orientation. I encounter a problem, where the new object-oriented version results in a fatal error, where the old array-oriented version didn't. I fetch records a

[PHP-DEV] PHP 5 Bug Summary Report

2008-11-17 Thread internals
PHP 5 Bug Database summary - http://bugs.php.net/ Num Status Summary (1204 total -- which includes 744 feature requests) ===[*General Issues]== 42294 To be documented round will not use PHP_ROUND_FUZZ on 64bit CPUs

[PHP-DEV] Re: Fatal error: Call to a member function on a non-object

2008-11-17 Thread Karsten Dambekalns
Hi. Christopher Vogt wrote: I fetch records a database. Sometime it happens that a record does not exist anymore. Let's assume it's a user, then $user will be NULL. echo $user['fullname']; // no error at all, $user['fullname'] === NULL Shouldn't this at least trigger a Notice? Check your

Re: [PHP-DEV] Fatal error: Call to a member function on a non-object

2008-11-17 Thread Christopher Vogt
Hi Kalle, I personally don't really mind it, as you got the instanceof and typehinting to check for whenever a variable is an object, so I would say its more of a user design issue. Fatal errors just requires you to refactor your code so your code shouldn't emit such things which I'm alright

[PHP-DEV] PHP 6 Bug Summary Report

2008-11-17 Thread internals
PHP 6 Bug Database summary - http://bugs.php.net/ Num Status Summary (66 total -- which includes 32 feature requests) ===[*General Issues]== 26771 Suspended register_tick_funtions crash under threaded webservers

Re: [PHP-DEV] Fatal error: Call to a member function on a non-object

2008-11-17 Thread Paweł Stradomski
W liście Christopher Vogt z dnia poniedziałek 17 listopada 2008: I have a good understanding of OOP. This is not a start for me. I am just refactoring existing PHP code to be object-oriented. You say there are plenty of reasons for a Fatal error, so please tell me a few, so I understand the

Re: [PHP-DEV] CVS Account Request: magicaltux

2008-11-17 Thread Lukas Kahwe Smith
On 16.11.2008, at 11:40, Mark Karpeles wrote: As most my [PATCH] mails sent to the internals mailing list were ignored (as of today, at least), I'm requesting an access to the PHP CVS, fully aware of what this means. My contributions (ordered by priority) would include: - The WDDX

[PHP-DEV] Re: Namespace resolution rules has been changed?

2008-11-17 Thread David Grudl
true, however i have a counter example: classes from more general namespace that use further nested classes (think some kind of behaviour and different drivers/plugins for example). so while it's true that more nested classes usually extend the less nested ones it also common for more generic

[PHP-DEV] Re: Namespace resolution rules has been changed?

2008-11-17 Thread David Grudl
Try to answer the question: what is the $obj instance of? namespace foo; $obj = $factory-loadClass('bar\class'); --- $factory is implemented cca this way: namespace ?; class Factory { function loadClass($class) { return new $class; } } With absolute FQN is the answer

Re: [PHP-DEV] Re: Namespace resolution rules has been changed?

2008-11-17 Thread Gregory Beaver
David Grudl wrote: Try to answer the question: what is the $obj instance of? namespace foo; $obj = $factory-loadClass('bar\class'); bar\class dynamic class names are always FQN. Greg -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] quick polls for 5.3 (sorry missed a couple votes, but they did not affect the results)

2008-11-17 Thread Michael Wallner
Lukas Kahwe Smith wrote: 7) should Output buffering rewrite MFH? this one comes with some baggage, we need enough people to actually have a look at how things are in HEAD and make it clear that they will be available for bug fixing and BC issues resolving. the risk here is obviously that any

[PHP-DEV] a stupid question

2008-11-17 Thread Ting Chen
Hi everybody, sorry this is a greenhand's stupid question. Why isn't 0.0 false? I know it is a string but I still think it equals to 0. Thanks ahead, green green~~ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] a stupid question

2008-11-17 Thread Andrew Rose
2008/11/17 Ting Chen [EMAIL PROTECTED]: Hi everybody, sorry this is a greenhand's stupid question. Why isn't 0.0 false? I know it is a string but I still think it equals to 0. I think you answered your own question there. Andrew -- PHP Internals - PHP Runtime Development Mailing List To

Re: [PHP-DEV] a stupid question

2008-11-17 Thread Federico Lebron
Andrew Rose wrote: 2008/11/17 Ting Chen [EMAIL PROTECTED]: Hi everybody, sorry this is a greenhand's stupid question. Why isn't 0.0 false? I know it is a string but I still think it equals to 0. I think you answered your own question there. Andrew What he means is that == is not

Re: [PHP-DEV] a stupid question

2008-11-17 Thread Ting Chen
i am recently studying Php5 manul. This is one of the examinations in the book. The answer is 0.0 is true rather than false. I am very curious about why if the answer is not wrong. green geen still green~ On 11/17/08, Andrew Rose [EMAIL PROTECTED] wrote: 2008/11/17 Ting Chen [EMAIL PROTECTED]:

Re: [PHP-DEV] a stupid question

2008-11-17 Thread Igor Feghali
maybe because 0 evaluating to false is already enough and everything after that would be forcing too much. If 0.0 evaluates to false then I would ask, why 0.0E1 doesn't ? What about 0.0E2 ? 0.0E10 ? etc. Just my opinion. regards, Igor. On Mon, Nov 17, 2008 at 11:22 AM, Ting Chen [EMAIL

Re: [PHP-DEV] Re: Namespace resolution rules has been changed?

2008-11-17 Thread Stan Vassilev | FM
Zend_Acl == Zend_Acl_Resource_Interface, Zend_Acl_Role_Interface, Zend_Acl_Role_Registry, Zend_Acl_Assert_Registry... Regard, Stan Vassilev Stan, ZF doesn't use namespaces yet. This is not namespaced code. Namespaced code requires different convention

[PHP-DEV] PostgreSQL pg_query_params, PHP locales, and double data types

2008-11-17 Thread Alec Smecher
Hi all, I'm trying to get a PHP bug in the PostgreSQL pg_query_params function reopened; it's been marked bogus (incorrectly IMO). There are lots of details at http://bugs.php.net/bug.php?id=46408. If this is in fact bogus, I'd appreciate a little bit of feedback. Many thanks! Alec Smecher

Re: [PHP-DEV] Re: Namespace resolution rules has been changed

2008-11-17 Thread David Grudl
I have downloaded last Mono source code (http://www.mono-project.com/, version 2.0.1), the open source version of one of the most complex and mature framework in the world, the .NET framework. Framework is written using namespaces (as opposite to current version of Zend). And I have analysed

Re: [PHP-DEV] array_key_exists BC break

2008-11-17 Thread Andrei Zmievski
Felipe Pena wrote: So as suggested and wished, here is a patch that add a modifier '%' to 'a' in parameter parsing API, where it allows object that implements ArrayAccess to be accept. Although it doesn't invoke any their methods, i.e. just how it works nowdays. A list of functions that allow

Re: [PHP-DEV] array_key_exists BC break

2008-11-17 Thread Andrei Zmievski
I meant '' actually. -Andrei -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PHP testsuite failures in Linux/ppc64

2008-11-17 Thread Thiago Jung Bauermann
El sáb, 18-10-2008 a las 22:24 +0400, Antony Dovgal escribió: On 15.10.2008 22:36, Thiago Jung Bauermann wrote: This leaves me with the integer overflow failure and the array slice failure, but they seem to be very specific, and wouldn't normaly bite the PHP developer. Right. That