openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vvras...@apache.org
Subject [incubator-openwhisk-runtime-php] branch master updated: Allow /run endpoint to accept more environment variables (#40)
Date Wed, 15 Aug 2018 14:20:44 GMT
This is an automated email from the ASF dual-hosted git repository.

vvraskin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-runtime-php.git


The following commit(s) were added to refs/heads/master by this push:
     new 56a764b  Allow /run endpoint to accept more environment variables (#40)
56a764b is described below

commit 56a764b80e5606f62369e912296a0bca6839d61f
Author: Carlos Santana <csantanapr@apache.org>
AuthorDate: Wed Aug 15 10:20:42 2018 -0400

    Allow /run endpoint to accept more environment variables (#40)
---
 core/php7.1Action/CHANGELOG.md | 4 ++++
 core/php7.1Action/router.php   | 4 ++--
 core/php7.2Action/CHANGELOG.md | 4 ++++
 core/php7.2Action/router.php   | 4 ++--
 4 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/core/php7.1Action/CHANGELOG.md b/core/php7.1Action/CHANGELOG.md
index 8ad347b..3c9b4cb 100644
--- a/core/php7.1Action/CHANGELOG.md
+++ b/core/php7.1Action/CHANGELOG.md
@@ -17,6 +17,10 @@
 #
 -->
 
+## 1.0.3
+Changes:
+  - Allow /run endpoint to accept more environment variables [#40](https://github.com/apache/incubator-openwhisk-runtime-php/pull/40)
+
 ## 1.0.2
 Changes:
   - Disallow re-initialization of function.
diff --git a/core/php7.1Action/router.php b/core/php7.1Action/router.php
index 76d8765..1ec8ecb 100644
--- a/core/php7.1Action/router.php
+++ b/core/php7.1Action/router.php
@@ -197,8 +197,8 @@ function run() : array
         return stripos($k, '__OW_') === 0;
     }, ARRAY_FILTER_USE_KEY);
     $env['PHP_VERSION'] = $_ENV['PHP_VERSION'];
-    foreach (['api_key', 'namespace', 'action_name', 'activation_id', 'deadline'] as $param)
{
-        if (array_key_exists($param, $post)) {
+    foreach (array_keys($post) as $param) {
+        if ($param !== "value") {
             $env['__OW_' . strtoupper($param)] = $post[$param];
         }
     }
diff --git a/core/php7.2Action/CHANGELOG.md b/core/php7.2Action/CHANGELOG.md
index 4e4c56e..4fd1847 100644
--- a/core/php7.2Action/CHANGELOG.md
+++ b/core/php7.2Action/CHANGELOG.md
@@ -17,6 +17,10 @@
 #
 -->
 
+## 1.0.2
+Changes:
+  - Allow /run endpoint to accept more environment variables [#40](https://github.com/apache/incubator-openwhisk-runtime-php/pull/40)
+
 ## 1.0.1
 Changes:
   - Disallow re-initialization of function.
diff --git a/core/php7.2Action/router.php b/core/php7.2Action/router.php
index bbf50e1..6346800 100644
--- a/core/php7.2Action/router.php
+++ b/core/php7.2Action/router.php
@@ -218,8 +218,8 @@ function run() : array
     }
 
     // assign environment variables from the posted data
-    foreach (['api_key', 'namespace', 'action_name', 'activation_id', 'deadline'] as $param)
{
-        if (array_key_exists($param, $post)) {
+    foreach (array_keys($post) as $param) {
+        if ($param !== "value") {
             $_ENV['__OW_' . strtoupper($param)] = $post[$param];
         }
     }


Mime
View raw message