Development

Changeset 13029

You must first sign up to be able to contribute.

Changeset 13029

Show
Ignore:
Timestamp:
11/16/08 17:52:26 (8 months ago)
Author:
fabien
Message:

[1.2] added some exception in sfObjectRoute when the method does not exist

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.2/lib/routing/sfObjectRoute.class.php

    r12753 r13029  
    158158    } 
    159159 
     160    if (!method_exists($className, $this->options['method'])) 
     161    { 
     162      throw new InvalidArgumentException(sprintf('The "%s::%s()" method does not exist.', $className, $this->options['method'])); 
     163    } 
     164 
    160165    return call_user_func(array($className, $this->options['method']), $this->filterParameters($parameters)); 
    161166  } 
     
    168173    { 
    169174      throw new InvalidArgumentException(sprintf('You must pass a "method" option for a %s object.', get_class($this))); 
     175    } 
     176 
     177    if (!method_exists($className, $this->options['method'])) 
     178    { 
     179      throw new InvalidArgumentException(sprintf('The "%s::%s()" method does not exist.', $className, $this->options['method'])); 
    170180    } 
    171181 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.