BrightcoveOS / PHP-MAPI-Wrapper

This project provides a starting point for integrating the Brightcove Media API into your application. It provides simple ways to interact with the API, as well as a long list of helper functions.
http://opensource.brightcove.com/project/PHP-MAPI-Wrapper/
48 stars 51 forks source link

Strict Warning BCMAPICache::get and ::set #30

Open kieste opened 10 years ago

kieste commented 10 years ago

Getting this when trying to run the current master (php5.4 + drupal7):

Strict warning: Non-static method BCMAPICache::get() should not be called statically, assuming $this from incompatible context in BCMAPI->getData() (line 1235 of /opt/bitnami/apps/drupal/htdocs/sites/all/libraries/brightcove/bc-mapi.php).

Strict warning: Non-static method BCMAPICache::set() should not be called statically, assuming $this from incompatible context in BCMAPI->getData() (line 1290 of /opt/bitnami/apps/drupal/htdocs/sites/all/libraries/brightcove/bc-mapi.php).
jroberson commented 9 years ago

I fixed it by changing the get() and set() methods from "public" to "public static"

bc-mapi-cache.php
-   public function get($key)
+   public static function get($key)
-   public function set($key, $data)
+   public static function set($key, $data)
haveboard commented 9 years ago

Thank you for this fix.