#38741 [NEW]: inconsistent feedback when accessing a null object

2006-09-07 Thread fh at ez dot no
From: fh at ez dot no
Operating system: linux
PHP version:  5.1.6
PHP Bug Type: Scripting Engine problem
Bug description:  inconsistent feedback when accessing a null object

Description:

Accessing a null object will only result in a notice if 
you are accessing a property but a fatal error if you are 
trying to access a method. 

This is especially strange if the object you expected to 
access uses __get and so you actually expect your code to 
fail.

I think at the very least that the notice should be 
upgraded to a warning. An error is also in place since 
accessing a member variable of a null value is most 
probably a serious problem in your application.

Reproduce code:
---
?php
$var = null;
echo $var-member; // notice
$var-member(); // fatal error
?



-- 
Edit bug report at http://bugs.php.net/?id=38741edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=38741r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=38741r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=38741r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38741r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=38741r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=38741r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=38741r=needscript
Try newer version:http://bugs.php.net/fix.php?id=38741r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=38741r=support
Expected behavior:http://bugs.php.net/fix.php?id=38741r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=38741r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=38741r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38741r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=38741r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38741r=dst
IIS Stability:http://bugs.php.net/fix.php?id=38741r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=38741r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=38741r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=38741r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=38741r=mysqlcfg


#36157 [NEW]: Introduce new PDO attribute to automatically close old statement.

2006-01-25 Thread fh at ez dot no
From: fh at ez dot no
Operating system: Gentoo Linux
PHP version:  5.1.2
PHP Bug Type: Feature/Change Request
Bug description:  Introduce new PDO attribute to automatically close old 
statement.

Description:

Currently when using the MySQL PDO driver, trying to 
execute a second statement while the first one is still 
active yields: 
SQLSTATE[HY000]: General error: 2014 Cannot execute 
queries while other unbuffered queries are active.Consider 
using PDOStatement::fetchAll().  Alternatively, if your 
code is only ever going to run against mysql, you may 
enable query buffering by setting the 
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. 
 
This is all well and good, but quite unhandy since it is 
inconsistent with e.g the postgres driver that does not 
suffer from this problem. It also makes it very hard e.g 
wrap the result of an SQL statement in an iterator since 
the user might break out of it. 
 
I propose to introduce a new attribute to PDO that force 
the drivers to automatically flush any open statements 
when a new one is executed. 


-- 
Edit bug report at http://bugs.php.net/?id=36157edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=36157r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=36157r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=36157r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36157r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=36157r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=36157r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=36157r=needscript
Try newer version:http://bugs.php.net/fix.php?id=36157r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=36157r=support
Expected behavior:http://bugs.php.net/fix.php?id=36157r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=36157r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=36157r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36157r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=36157r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36157r=dst
IIS Stability:http://bugs.php.net/fix.php?id=36157r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=36157r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=36157r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=36157r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=36157r=mysqlcfg


#35770 [NEW]: inconsistent method naming PDO::exec and PDOStatement::execute

2005-12-22 Thread fh at ez dot no
From: fh at ez dot no
Operating system: linux - gentoo
PHP version:  5.1.1
PHP Bug Type: PDO related
Bug description:  inconsistent method naming PDO::exec and PDOStatement::execute

Description:

The methods should either be named the same or given names 
that separate them more clearly. 


-- 
Edit bug report at http://bugs.php.net/?id=35770edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=35770r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=35770r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=35770r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=35770r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=35770r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=35770r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=35770r=needscript
Try newer version:http://bugs.php.net/fix.php?id=35770r=oldversion
Not developer issue:  http://bugs.php.net/fix.php?id=35770r=support
Expected behavior:http://bugs.php.net/fix.php?id=35770r=notwrong
Not enough info:  
http://bugs.php.net/fix.php?id=35770r=notenoughinfo
Submitted twice:  
http://bugs.php.net/fix.php?id=35770r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35770r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=35770r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35770r=dst
IIS Stability:http://bugs.php.net/fix.php?id=35770r=isapi
Install GNU Sed:  http://bugs.php.net/fix.php?id=35770r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=35770r=float
No Zend Extensions:   http://bugs.php.net/fix.php?id=35770r=nozend
MySQL Configuration Error:http://bugs.php.net/fix.php?id=35770r=mysqlcfg


#35770 [WFx]: inconsistent method naming PDO::exec and PDOStatement::execute

2005-12-22 Thread fh at ez dot no
 ID:   35770
 User updated by:  fh at ez dot no
 Reported By:  fh at ez dot no
 Status:   Wont fix
 Bug Type: PDO related
 Operating System: linux - gentoo
 PHP Version:  5.1.1
 Assigned To:  wez
 New Comment:

You have aliases for this. At the very least fix this in 
PHP 6. 
Derick also noted another inconsistency in PDO: 
13:15:25] Derick they also have beginTransaction, commit 
and rollback


Previous Comments:


[2005-12-22 14:18:02] [EMAIL PROTECTED]

too late to change this for BC reasons



[2005-12-22 11:34:26] [EMAIL PROTECTED]

Assigned to the maintainer.



[2005-12-22 11:10:04] fh at ez dot no

Description:

The methods should either be named the same or given names 
that separate them more clearly. 






-- 
Edit this bug report at http://bugs.php.net/?id=35770edit=1