Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

BUG More specific i18n include paths to avoid Zend_Loader problems #904

Closed
wants to merge 1 commit into from

2 participants

@chillu
Owner

The problem surfaced for configurations where include_path
didn't include the current directory.
See http://www.silverstripe.org/installing-silverstripe/show/20224
for details.

@chillu chillu BUG More specific i18n include paths to avoid Zend_Loader problems
The problem surfaced for configurations where include_path
didn't include the current directory.
See http://www.silverstripe.org/installing-silverstripe/show/20224
for details.
4eec6ef
@stojg
Owner

I wonder is it a viable solution to add search for the Class in the current directory to the ClassLoader::loadClass(), or will Zend ignore that even though both Zend and Framework are using spl_autoload_register()?

Maybe it doesn't work like that due to current working directory.

another option: set_include_path('.'.PATH_SEPARATOR.get_include_path());

@chillu
Owner

Right, yeah I think set_include_path() is the way to go - its an implicit assumption in the framework at the moment. See #916

@chillu chillu closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 29, 2012
  1. @chillu

    BUG More specific i18n include paths to avoid Zend_Loader problems

    chillu authored
    The problem surfaced for configurations where include_path
    didn't include the current directory.
    See http://www.silverstripe.org/installing-silverstripe/show/20224
    for details.
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 2 deletions.
  1. +4 −2 i18n/i18n.php
View
6 i18n/i18n.php
@@ -1,7 +1,9 @@
<?php
require_once 'Zend/Translate.php';
-require_once 'i18nRailsYamlAdapter.php';
-require_once 'i18nSSLegacyAdapter.php';
+
+// Overrule Zend_Loader
+require_once FRAMEWORK_PATH . DIRECTORY_SEPARATOR . 'i18n' . DIRECTORY_SEPARATOR . 'i18nRailsYamlAdapter.php';
+require_once FRAMEWORK_PATH . DIRECTORY_SEPARATOR . 'i18n' . DIRECTORY_SEPARATOR . 'i18nSSLegacyAdapter.php';
/**
* Base-class for storage and retrieval of translated entities.
Something went wrong with that request. Please try again.