From f0738cc4d62592690050246d0e08c7bec3cc6d46 Mon Sep 17 00:00:00 2001 From: Michael Maclean Date: Wed, 9 Jan 2013 22:01:52 +0000 Subject: [PATCH] Fix compilation on 5.4 --- opencv.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opencv.cpp b/opencv.cpp index d26d7f2..5686b7a 100644 --- a/opencv.cpp +++ b/opencv.cpp @@ -41,12 +41,14 @@ PHP_OPENCV_API void php_opencv_basedir_check(const char *filename TSRMLS_DC) { char *error_message; int status; +#if PHP_VERSION_ID < 50400 if (PG(safe_mode) && (!php_checkuid_ex(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR, CHECKUID_NO_ERRORS))) { error_message = estrdup("Could not access file due to safe_mode restrictions"); zend_throw_exception(opencv_ce_cvexception, (char *) error_message, status TSRMLS_CC); efree(error_message); return; } +#endif if (PG(open_basedir) && php_check_open_basedir_ex(filename, 0 TSRMLS_CC)) { error_message = estrdup("Could not access file due to open_basedir restrictions");