Skip to content

Commit

Permalink
Ensure a 0 id value in the url is not seen as empty and replaced with…
Browse files Browse the repository at this point in the history
… a blank.
  • Loading branch information
kpheasey committed Apr 23, 2015
1 parent 780fa67 commit 99fee4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/code/community/Gemgento/Push/Model/Observer.php
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ public function store_save($observer) {
*/
public function push($action, $path, $id, $data) {
$data_string = json_encode(Array('data' => $data));
$url = $this->gemgento_url() . $path . (empty($id) ? '' : "/{$id}");
$url = $this->gemgento_url() . $path . (!is_numeric($id) && empty($id) ? '' : "/{$id}");
$parts = parse_url($url);

switch ($parts['scheme']) {
Expand Down

0 comments on commit 99fee4a

Please sign in to comment.