Skip to content

Instantly share code, notes, and snippets.

@dr5hn
Last active March 13, 2024 12:04
Show Gist options
  • Save dr5hn/fd1679c5e01b7d33309cacdf60e16ea3 to your computer and use it in GitHub Desktop.
Save dr5hn/fd1679c5e01b7d33309cacdf60e16ea3 to your computer and use it in GitHub Desktop.
#[ReturnTypeWillChange] Fix Pixelyoursite Deprecation Errors PHP 8.1
diff --git a/vendor_prefix/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/Event.php b/vendor_prefix/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/Event.php
index 3373410..1c7c5f3 100644
--- a/vendor_prefix/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/Event.php
+++ b/vendor_prefix/facebook/php-business-sdk/src/FacebookAds/Object/ServerSide/Event.php
@@ -342,6 +342,7 @@ class Event implements ArrayAccess {
* @param integer $offset Offset
* @return boolean
*/
+ #[\ReturnTypeWillChange]
public function offsetExists($offset) : bool {
return isset($this->container[$offset]);
}
@@ -351,6 +352,7 @@ class Event implements ArrayAccess {
* @param integer $offset Offset
* @return mixed
*/
+ #[\ReturnTypeWillChange]
public function offsetGet($offset) : mixed {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
@@ -361,6 +363,7 @@ class Event implements ArrayAccess {
* @param mixed $value Value to be set
* @return void
*/
+ #[\ReturnTypeWillChange]
public function offsetSet($offset, $value) : void {
if (is_null($offset)) {
$this->container[] = $value;
@@ -374,6 +377,7 @@ class Event implements ArrayAccess {
* @param integer $offset Offset
* @return void
*/
+ #[\ReturnTypeWillChange]
public function offsetUnset($offset) : void {
unset($this->container[$offset]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment