• I have some issues with an eBay API call that will simply not work as expected and I start to wonder if that is maybe because of the WordPress container.

    I am unsure, but the culprit might be global

    This is the snipped that may cause the problem, I am not sure though:

    function buildURLArray ($filterarray) {
      global $urlfilter;
      global $i;
      // Iterate through each filter in the array
      foreach($filterarray as $itemfilter) {
        // Iterate through each key in the filter
        foreach ($itemfilter as $key =>$value) {
          if(is_array($value)) {
            foreach($value as $j => $content) { // Index the key for each value
              $urlfilter .= "&itemFilter($i).$key($j)=$content";
            }
          }
          else {
            if($value != "") {
              $urlfilter .= "&itemFilter($i).$key=$value";
            }
          }
        }
        $i++;
      }
      return "$urlfilter";

    $urlfilter will be empty.

    Any comment or workaround?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Is there any forbidden PHP ?’ is closed to new replies.