Skip to content
This repository was archived by the owner on Jul 22, 2021. It is now read-only.

Cleanup global namespace #61

@ctrahey

Description

@ctrahey

sdk.class.php issues a call to unset() at the bottom of the file, and unsets several variables. At the surface, this is good housekeeping. However, these are all in the global namespace and therefore conflict with the calling scope.

A concrete example: I'm using the SDK in Drupal, and their library loading mechanism uses a variable called $path in the vary part of the code that requires this file, and it's in a loop (loading several of the files in this sdk). After including sdk.class.php, the $path variable is no longer present and subsequent file paths can no longer be created.

My suggestion is to use 'aws' namespaced variables (and not necessarily the PHP Namespace feature, though that would be great), but at least things like $aws_config_path instead of simply $path if you must use a global scope.

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions