php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36978 PHP Crashes and issues a windows message box
Submitted: 2006-04-04 23:06 UTC Modified: 2006-04-05 14:15 UTC
From: thomas dot ene at gmail dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.1.2 OS: Windows
Private report: No CVE-ID: None
 [2006-04-04 23:06 UTC] thomas dot ene at gmail dot com
Description:
------------
The code below produces:
Fatal error: Couldn't execute method demo::__set in Unknown on line 0
and also a windows message box.

Reproduce code:
---------------
<?php
	
	class base
	{
		function __get($key)
		{
			throw new Exception();
		}
		function __set($key, $val)
		{
		}
	}
	
	class demo extends base
	{
		function demo()
		{
		}
		function play()
		{
			$this->a++;
		}
	}
	
	$obj = new demo();
	$obj->play();
	
?>

Expected result:
----------------
It should set the property a to 1 in the demo class

Actual result:
--------------
The code below produces:
Fatal error: Couldn't execute method demo::__set in Unknown on line 0
and also a windows message box.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-05 06:30 UTC] mike@php.net
A "Fatal Error" ain't a crash.
You can't use in/decrement operators on overloaded properties.

 [2006-04-05 14:07 UTC] thomas dot ene at gmail dot com
Yes but showing a windows popup isn't normal behaviour either.
Anyway, thanks for the information. The issue about increment/decrement operators wasn't commented out in the standard documentation.

Thank you and have a splendid day.
 [2006-04-05 14:15 UTC] mike@php.net
If you really experience a crash, we'd need a backtrace at least.

Thanks
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 09:01:31 2024 UTC