Skip to content

Commit

Permalink
Make sure convert.php works with php5.6.1 on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
gggeek committed Feb 21, 2015
1 parent 16d00b7 commit 040d77f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion doc/convert.php
Expand Up @@ -33,7 +33,12 @@
ini_set("xsl.security_prefs", XSL_SECPREF_CREATE_DIRECTORY | XSL_SECPREF_WRITE_FILE);
}
} else {
$proc->setSecurityPreferences(XSL_SECPREF_CREATE_DIRECTORY | XSL_SECPREF_WRITE_FILE);
// the php online docs only mention setSecurityPrefs, but somehow some installs have setSecurityPreferences...
if (method_exists('XSLTProcessor', 'setSecurityPrefs')) {
$proc->setSecurityPrefs(XSL_SECPREF_CREATE_DIRECTORY | XSL_SECPREF_WRITE_FILE);
} else {
$proc->setSecurityPreferences(XSL_SECPREF_CREATE_DIRECTORY | XSL_SECPREF_WRITE_FILE);
}
}
$proc->importStyleSheet($xsl); // attach the xsl rules

Expand Down

0 comments on commit 040d77f

Please sign in to comment.