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

RobinvdM opened this Issue Nov 21, 2012 · 3 comments


None yet
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.


Maks3w commented Nov 21, 2012

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


prolic commented Nov 30, 2012

This can be closed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment