Skip to content

Commit 9ee2561

Browse files
authored
fix: preload error with aliases.php (#1978)
1 parent d4eb15d commit 9ee2561

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/aliases.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
22

3+
if (class_exists('Google_Client')) {
4+
// Prevent error with preloading in PHP 7.4
5+
// @see https://github.com/googleapis/google-api-php-client/issues/1976
6+
return;
7+
}
8+
39
$classMap = [
410
'Google\\Client' => 'Google_Client',
511
'Google\\Service' => 'Google_Service',

0 commit comments

Comments
 (0)