Call to undefined function sc_include() in onScriptInit

Hi,

This doesn’t make sense to me, is anyone else experiencing this? I have the following simple set of code (a php library with autoloader and a simple function in the other),

sc_include_library("sys", "phpXXXkLib", "XXX/Autoloader/Autoloader.php", true, true);
sc_include(security_helper.php, sys);

When I run this I get “Call to undefined function sc_include()”. If I add the macros in reverse my libraries work perfectly (and no errors).

sc_include(security_helper.php, sys);
sc_include_library("sys", "phpXXXkLib", "XXX/Autoloader/Autoloader.php", true, true);

Is there a macro order dependency in scriptcase - sc_include before sc_include_library? Although it’s still bizarre to me that the it doesn’t recognize sc_include even if order is a dependency.

I even tested this out on the simplest of dummy data and I get the same error.

sc_include_library("sys", "delete_me", "echo.php", true, true);
sc_include(int_delete_me.php, sys);

The echo.php file contains just

<?php
echo 'hello';
?>

and the int_delete_me.php file contains

<?php
function hello(){
  echo 'hello';
}
?>

Arthur

In case anyone is wondering why I didn’t just include the internal library using the “checkbox” method, it’s because my internal library has code outside of the function which means you must use sc_include.