php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41351 Fatal error: Invalid opcode 81/16/8
Submitted: 2007-05-10 12:40 UTC Modified: 2007-05-11 09:39 UTC
From: jonathan dot de dot berdt at howest dot be Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5.2.2 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
47 + 49 = ?
Subscribe to this entry?

 
 [2007-05-10 12:40 UTC] jonathan dot de dot berdt at howest dot be
Description:
------------
error thrown on the first 'foreach' command.

server using: php 5.2.1

Reproduce code:
---------------
$query = array ('table', 'room');
$criteria = array ('table' => array ('subjects', 'teachers', 'groups', 'rooms', 'tableparts'),
	'room' => array ('rooms', 'roomtypes', 'roomcapacity', 'roomcomputercapacity', 'roomotherkeywords', 'tableparts'));
foreach ($query[] as $qry)
{
	foreach($criteria[$qry][] as $crit)
	{
		if (isset($_GET['leer_' . $qry . 'query_' . $crit. '_removekeyword']))
		{
			unset ($_SESSION['leer_' . $qry . 'query_' . $crit . '_selectedkeywords']
				[$_GET['leer_' . $qry . 'query_' . $crit. '_removekeyword']]);
		}
	}
}


Expected result:
----------------
this code should process a number of session variables. These variables have a structured name, and thus the changing parts have been put in these small arrays.

Actual result:
--------------
Fatal error: Invalid opcode 81/16/8. in /var/www/html/dokeos/main/leer/leer.php on line 198

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-05-10 20:24 UTC] sniper@php.net
How about you remove those []'s from this:
foreach ($query[] as $qry)

Might actually work..and same for the other foreach.
 [2007-05-11 07:14 UTC] jonathan dot de dot berdt at howest dot be
Yes, that solved my problem/fatal error!
 [2007-05-11 09:39 UTC] tony2001@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 11:01:27 2024 UTC