Having the module set the include path every page load might be a bit excessive. It should be moved to a check inside zend_include, which would add the include path only the first time the function is called.

Comments

mustafau’s picture

My suggestion for zend_include:

function zend_include($file) {
  $included = @include_once($file);
  
  if ($included) {
    return $included;
  }
  
  zend_set_include_path();
  $included = @include_once($file);
  
  return $included;
} 
mustafau’s picture

May I suggest a zend_require function:

function zend_require($file) {
  $included = @require_once($file);
  
  if ($included) {
    return $included;
  }
  
  zend_set_include_path();
  $included = @require_once($file);
  
  return $included;
} 
robloach’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.