Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Extending Zend\Mvc\Router\Http\Segment causes error #3044

RobinvdM opened this Issue · 3 comments

5 participants


As of ZF 2.0.4: extending the Segment class, with the purpose of creating a custom router class, causes an error.

namespace MyNamespace\Mvc\Router\Http;
use Shared\Mvc\Router\Http\Segment,

class CustomSegment extends Segment {


Fatal error: Cannot access property MyNamespace\Mvc\Router\Http\PackageToken::$urlencodeCorrectionMap in /library/Zend-2.0/Mvc/Router/Http/Segment.php on line 412

Workaround: adding a public static urlencodeCorrectionMap variable to the custom class.


with protect visibility should be enough. Can you send a patch with that?


I have issued a fix for this since the OP did not reply in 6 days. It can be found in PR 3067 along with fixes to the Zend Http Client


This can be closed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.