Bug #64677 [Opn->Csd]: execution operator `` stealing surrounding arguments

From: Date: Sat, 20 Apr 2013 07:24:17 +0000
Subject: Bug #64677 [Opn->Csd]: execution operator `` stealing surrounding arguments
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-178551@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64677&edit=1 ID: 64677 Updated by: laruence@php.net Reported by: knivey at botops dot net Summary: execution operator `` stealing surrounding arguments -Status: Open +Status: Closed Type: Bug Package: Scripting Engine problem Operating System: Ubuntu 12.04LTS PHP Version: 5.5.0beta3 Block user comment: N Private report: N New Comment: Automatic comment on behalf of laruence Revision: http://git.php.net/?p=php-src.git;a=commit;h=6ed16753c146ea2a06271ac537761430bad3059a Log: Fixed bug #64677 (execution operator `` stealing surrounding arguments) Previous Comments: ------------------------------------------------------------------------ [2013-04-20 07:00:02] laruence@php.net The following patch has been added/updated: Patch Name: bug64677.diff Revision: 1366441202 URL: https://bugs.php.net/patch-display.php?bug=64677&patch=bug64677.diff&revision=1366441202 ------------------------------------------------------------------------ [2013-04-20 04:41:18] knivey at botops dot net Description: ------------ When used the execution operator ` as an argument passed to a class method, you will end up with a seg fault or invalid args to shell_exec error Test script: --------------- <?PHP class cat { public function show_output($prepend, $output = '') {echo $prepend . $output;} public function show_out($output) {echo $output;} } $cat = new cat(); $cat->show_output('Files: ', trim(ls)); // this gives invalid args to shell_exec $cat->show_output('Files: ', ls); // this causes a segmentation fault $cat->show_out(ls); // this causes a segmentation fault function show_outputa($prepend, $output) {echo $prepend . $output;} show_outputa('Files: ', ls); // this works as expected ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=64677&edit=1

« previous php.bugs (#178551) next »