You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/08/15 14:20:44 UTC

[GitHub] vvraskin closed pull request #40: Allow /run endpoint to accept more environment variables

vvraskin closed pull request #40: Allow /run endpoint to accept more environment variables
URL: https://github.com/apache/incubator-openwhisk-runtime-php/pull/40
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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];
         }
     }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services