summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-01-14 09:46:43 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-01-14 09:46:43 +0100
commitd8fe9239959dfeae11daa5de70126e30119d3b75 (patch)
tree34cc008c32e26beb42f8fea1e1e45e2a1f960286 /include
parente14d8c6f985aeaeb247387b51d6ec027655efb99 (diff)
fix for issue #159: the eval() function no longer relies on the Zend zend_eval_stringl_ex() function, because that function modifies the to-be-evaluated php code, which could result in syntax errors for perfectly valid PHP code
Diffstat (limited to 'include')
-rw-r--r--include/script.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/script.h b/include/script.h
index af68a59..fb546ea 100644
--- a/include/script.h
+++ b/include/script.h
@@ -65,6 +65,12 @@ public:
Script(const char *source) noexcept : Script("Unknown", source, ::strlen(source)) {}
/**
+ * Constructor based on a std::string
+ * @param source PHP source code to be evaluated
+ */
+ Script(const std::string &source) noexcept : Script("Unknown", source.c_str(), source.size()) {}
+
+ /**
* Destructor
*/
virtual ~Script();