Changeset 1778

Show
Ignore:
Timestamp:
08/06/08 17:35:36 (3 months ago)
Author:
mikey
Message:

fix forward compatibility issues with PHP 5.3

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • framework/trunk/src/main/php/net/stubbles/ipo/request/stubWebRequest.php

    r1763 r1778  
    2727    protected function doConstuct() 
    2828    { 
    29         $this->unsecureParams  = array_merge(array_map(array($this, 'stripSlashes'), $_GET), array_map(array($this, 'stripSlashes'), $_POST)); 
     29        $this->unsecureParams  = array_merge(array_map(array(__CLASS__, 'stripSlashes'), $_GET), array_map(array(__CLASS__, 'stripSlashes'), $_POST)); 
    3030        $this->unsecureHeaders = $_SERVER; 
    3131        $this->unsecureCookies = $_COOKIE; 
     
    3939     * @return  string|array  stripslashed' value 
    4040     */ 
    41     private function stripSlashes($value) 
     41    public static function stripSlashes($value) 
    4242    { 
    4343        if (is_array($value) === false) { 
     
    4747        $tmp = array(); 
    4848        foreach ($value as $id => $content) { 
    49             $tmp[$id] = $this->stripslashes($content); 
     49            $tmp[$id] = self::stripslashes($content); 
    5050        } 
    5151             
  • framework/trunk/src/test/php/net/stubbles/websites/rasmus/testpage.php

    r1763 r1778  
    1 <html><head><title><?= $this->request->getMethod();?></title></head><body><?php echo $this->session->getValue('foo'); $this->response->setStatusCode(304);?></body></html> 
     1<html><head><title><?php echo $this->request->getMethod();?></title></head><body><?php echo $this->session->getValue('foo'); $this->response->setStatusCode(304);?></body></html>