Advertisement
fultonchain

Smart Map PHP 7.4.1 error

Dec 30th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.37 KB | None | 0 0
  1. 
  2. PHP Deprecated Warning – yii\base\ErrorException
  3. array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead
  4. 1. in /var/www/tailwind/vendor/doublesecretagency/craft-smartmap/src/services/Variables.phpat line 196
  5. 2. in /var/www/tailwind/vendor/craftcms/cms/src/web/ErrorHandler.php at line 80– yii\base\ErrorHandler::handleError()
  6. 74757677787980818283848586 {
  7. // Because: https://bugs.php.net/bug.php?id=74980
  8. if (PHP_VERSION_ID >= 70100 && strpos($message, 'Narrowing occurred during type inference. Please file a bug report') !== false) {
  9. return null;
  10. }
  11.  
  12. return parent::handleError($code, $message, $file, $line);
  13. }
  14.  
  15. /**
  16. * @inheritdoc
  17. */
  18. public function getExceptionName($exception)
  19. 3. craft\web\ErrorHandler::handleError()
  20. 4. in /var/www/tailwind/vendor/doublesecretagency/craft-smartmap/src/services/Variables.php at line 196– array_key_exists()
  21. 190191192193194195196197198199200201202
  22. // Set defaults
  23. $markers = [];
  24. $center = SmartMap::$plugin->smartMap->defaultCoords();
  25.  
  26. // If multiple locations
  27. if (!empty($locations) && array_key_exists(0, $locations)) {
  28.  
  29. $allLats = [];
  30. $allLngs = [];
  31.  
  32. // If location elements are Matrix fields
  33. if (is_a($locations[0], 'craft\\elements\\MatrixBlock')) {
  34. 5. in /var/www/tailwind/vendor/doublesecretagency/craft-smartmap/src/services/Variables.php at line 139– doublesecretagency\smartmap\services\Variables::_parseMarkers()
  35. 133134135136137138139140141142143144145 if (array_key_exists('markerInfo', $options)) {
  36. $infoWindowOptions['template'] = $options['markerInfo'];
  37. unset($options['markerInfo']);
  38. }
  39.  
  40. // Determine map center
  41. $markersCenter = $this->_parseMarkers($mapId, $markers, $markerOptions);
  42. if (array_key_exists('center', $options)) {
  43. $center = $this->_parseCenter($options['center']);
  44. } else {
  45. $center = $this->_parseCenter($markersCenter);
  46. }
  47. $options['center'] = 'smartMap.coords('.$center['lat'].','.$center['lng'].')';
  48. 6. in /var/www/tailwind/vendor/doublesecretagency/craft-smartmap/src/variables/SmartMapVariable.php at line 28– doublesecretagency\smartmap\services\Variables::dynamicMap()
  49. 22232425262728293031323334class SmartMapVariable
  50. {
  51.  
  52. // Display a dynamic Google map
  53. public function map($markers = false, $options = [])
  54. {
  55. return SmartMap::$plugin->smartMap_variables->dynamicMap($markers, $options);
  56. }
  57.  
  58. // Display a static map image
  59. public function img($markers = false, $options = [])
  60. {
  61. return SmartMap::$plugin->smartMap_variables->staticMap($markers, $options);
  62. 7. in /var/www/tailwind/vendor/twig/twig/src/Extension/CoreExtension.php at line 1495– doublesecretagency\smartmap\variables\SmartMapVariable::map()
  63. 8. in /var/www/tailwind/vendor/craftcms/cms/src/helpers/Template.php at line 105– twig_get_attribute()
  64. 99100101102103104105106107108109110111 // Add deprecated support for the old DateTime methods
  65. if ($object instanceof \DateTime && ($value = self::_dateTimeAttribute($object, $item, $type)) !== false) {
  66. return $value;
  67. }
  68.  
  69. try {
  70. return \twig_get_attribute($env, $source, $object, $item, $arguments, $type, $isDefinedTest, $ignoreStrictCheck);
  71. } catch (UnknownMethodException $e) {
  72. // Copy twig_get_attribute()'s BadMethodCallException handling
  73. if ($ignoreStrictCheck || !$env->isStrictVariables()) {
  74. return null;
  75. }
  76. throw new RuntimeError($e->getMessage(), -1, $source);
  77. 9. in /var/www/tailwind/storage/runtime/compiled_templates/94/94c414c548a17859a7f52bc258314ecd9094a363e2dee48dd78e41d6c77e640f.php at line 106– craft\helpers\Template::attribute()
  78. 10. in /var/www/tailwind/vendor/twig/twig/src/Template.php at line 184– __TwigTemplate_d430864f263f78cd2ebc5765079f6aa8a949903d386f76f2f80cd411df1ce06e::block_content()
  79. 11. in /var/www/tailwind/storage/runtime/compiled_templates/94/94c414c548a17859a7f52bc258314ecd9094a363e2dee48dd78e41d6c77e640f.php at line 62– Twig\Template::displayBlock()
  80. 12. in /var/www/tailwind/vendor/twig/twig/src/Template.php at line 407– __TwigTemplate_d430864f263f78cd2ebc5765079f6aa8a949903d386f76f2f80cd411df1ce06e::doDisplay()
  81. 13. in /var/www/tailwind/vendor/twig/twig/src/Template.php at line 380– Twig\Template::displayWithErrorHandling()
  82. 14. in /var/www/tailwind/vendor/twig/twig/src/Template.php at line 392– Twig\Template::display()
  83. 15. in /var/www/tailwind/vendor/twig/twig/src/TemplateWrapper.php at line 45– Twig\Template::render()
  84. 16. in /var/www/tailwind/vendor/twig/twig/src/Environment.php at line 318– Twig\TemplateWrapper::render()
  85. 17. in /var/www/tailwind/vendor/craftcms/cms/src/web/View.php at line 400– Twig\Environment::render()
  86. 394395396397398399400401402403404405406 // Render and return
  87. $renderingTemplate = $this->_renderingTemplate;
  88. $this->_renderingTemplate = $template;
  89.  
  90. $e = null;
  91. try {
  92. $output = $this->getTwig()->render($template, $variables);
  93. } catch (\Throwable $e) {
  94. // throw it later
  95. }
  96.  
  97. $this->_renderingTemplate = $renderingTemplate;
  98. $this->setTemplateMode($oldTemplateMode);
  99. 18. in /var/www/tailwind/vendor/craftcms/cms/src/web/View.php at line 461– craft\web\View::renderTemplate()
  100. 455456457458459460461462463464465466467 $isRenderingPageTemplate = $this->_isRenderingPageTemplate;
  101. $this->_isRenderingPageTemplate = true;
  102.  
  103. $e = null;
  104. try {
  105. $this->beginPage();
  106. echo $this->renderTemplate($template, $variables);
  107. $this->endPage();
  108. } catch (\Throwable $e) {
  109. // throw it later
  110. }
  111.  
  112. $this->_isRenderingPageTemplate = $isRenderingPageTemplate;
  113. 19. in /var/www/tailwind/vendor/craftcms/cms/src/web/Controller.php at line 244– craft\web\View::renderPageTemplate()
  114. 238239240241242243244245246247248249250 }
  115.  
  116. $headers->set('content-type', $mimeType . '; charset=' . $response->charset);
  117. }
  118.  
  119. // Render and return the template
  120. $response->data = $this->getView()->renderPageTemplate($template, $variables, $templateMode);
  121.  
  122. // Prevent a response formatter from overriding the content-type header
  123. $response->format = YiiResponse::FORMAT_RAW;
  124.  
  125. return $response;
  126. }
  127. 20. in /var/www/tailwind/vendor/craftcms/cms/src/controllers/TemplatesController.php at line 104– craft\web\Controller::renderTemplate()
  128. 9899100101102103104105106107108109110
  129. // Merge any additional route params
  130. $routeParams = Craft::$app->getUrlManager()->getRouteParams();
  131. unset($routeParams['template'], $routeParams['template']);
  132. $variables = array_merge($variables, $routeParams);
  133.  
  134. return $this->renderTemplate($template, $variables);
  135. }
  136.  
  137. /**
  138. * Shows the 'offline' template.
  139. *
  140. * @return Response
  141. 21. craft\controllers\TemplatesController::actionRender()
  142. 22. in /var/www/tailwind/vendor/yiisoft/yii2/base/InlineAction.php at line 57– call_user_func_array()
  143. 23. in /var/www/tailwind/vendor/yiisoft/yii2/base/Controller.php at line 157– yii\base\InlineAction::runWithParams()
  144. 24. in /var/www/tailwind/vendor/craftcms/cms/src/web/Controller.php at line 187– yii\base\Controller::runAction()
  145. 181182183184185186187188189190191192193 /**
  146. * @inheritdoc
  147. */
  148. public function runAction($id, $params = [])
  149. {
  150. try {
  151. return parent::runAction($id, $params);
  152. } catch (\Throwable $e) {
  153. if (Craft::$app->getRequest()->getAcceptsJson()) {
  154. Craft::$app->getErrorHandler()->logException($e);
  155. if (!YII_DEBUG && !$e instanceof UserException) {
  156. $message = Craft::t('app', 'An unknown error occurred.');
  157. } else {
  158. 25. in /var/www/tailwind/vendor/yiisoft/yii2/base/Module.php at line 528– craft\web\Controller::runAction()
  159. 26. in /var/www/tailwind/vendor/craftcms/cms/src/web/Application.php at line 299– yii\base\Module::runAction()
  160. 293294295296297298299300301302303304305 * @param string $route
  161. * @param array $params
  162. * @return Response|null The result of the action, normalized into a Response object
  163. */
  164. public function runAction($route, $params = [])
  165. {
  166. $result = parent::runAction($route, $params);
  167.  
  168. if ($result !== null) {
  169. if ($result instanceof Response) {
  170. return $result;
  171. }
  172.  
  173. 27. in /var/www/tailwind/vendor/yiisoft/yii2/web/Application.php at line 103– craft\web\Application::runAction()
  174. 28. in /var/www/tailwind/vendor/craftcms/cms/src/web/Application.php at line 284– yii\web\Application::handleRequest()
  175. 278279280281282283284285286287288289290 if (($response = $this->_processActionRequest($request)) !== null) {
  176. return $response;
  177. }
  178.  
  179. // If we're still here, finally let Yii do it's thing.
  180. try {
  181. return parent::handleRequest($request);
  182. } catch (\Throwable $e) {
  183. $this->_unregisterDebugModule();
  184. throw $e;
  185. }
  186. }
  187.  
  188. 29. in /var/www/tailwind/vendor/yiisoft/yii2/base/Application.php at line 386– craft\web\Application::handleRequest()
  189. 30. in /var/www/tailwind/web/index.php at line 21– yii\base\Application::run()
  190. 15161718192021 (new Dotenv\Dotenv(CRAFT_BASE_PATH))->load();
  191. }
  192.  
  193. // Load and run Craft
  194. define('CRAFT_ENVIRONMENT', getenv('ENVIRONMENT') ?: 'production');
  195. $app = require CRAFT_VENDOR_PATH.'/craftcms/cms/bootstrap/web.php';
  196. $app->run();
  197. $_GET = [
  198. 'p' => 'promotions/promo-one',
  199. ];
  200.  
  201. $_COOKIE = [
  202. '1031b8c41dfff97a311a7ac99863bdc5_username' => '31a6c39afbddf51963012ae48eab548fc532520c37b69f639a27405e7f5a4f84a:2:{i:0;s:41:"1031b8c41dfff97a311a7ac99863bdc5_username";i:1;s:11:"fultonchain";}',
  203. '__stripe_mid' => '3f74887b-9de4-4167-ae8a-505e5beb1337',
  204. 'CRAFT_CSRF_TOKEN' => '82dbf80cb329437108e6a0a7f05f8cc3f864efeabe1421655ae389325832b370a:2:{i:0;s:16:"CRAFT_CSRF_TOKEN";i:1;s:208:"gv9oqqBF57xvBAWBAKRotvfJK3paH1d-kJec89a8|6929cbc05c39fbbb920e391e7622ccfaad12aeb550375d268a1d84bbaf70736fgv9oqqBF57xvBAWBAKRotvfJK3paH1d-kJec89a8|1|$2y$13$OQmF541jov8VJ0Eoy.VoC.iqLSPRd84KxzpRrjslwlGRMEfPvqnmC";}',
  205. 'CraftSessionId' => '0rf3isb8o417p0clr1qf3grbpp',
  206. '1031b8c41dfff97a311a7ac99863bdc5_identity' => '09292c3d6bfcde3a41aad93ed1c4f92dc5eb2cf77729efaf99d8f75443099ba8a:2:{i:0;s:41:"1031b8c41dfff97a311a7ac99863bdc5_identity";i:1;s:233:"["1","[\\"exhFELoxlFGj0jZK3mWbYkV1iD0u-Bp7w6Hxf3Jf_RaqdA0aiq8ieNieQ6jNkLId7r3BvTwXXj7aKde6NRkd8hoZknTmEkphvxXH\\",null,\\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36\\"]",3600]";}',
  207. ];
  208.  
  209. $_SESSION = [
  210. 'bd62416aa8538ede709019a5e113eea5__flash' => [],
  211. '1031b8c41dfff97a311a7ac99863bdc5__token' => 'exhFELoxlFGj0jZK3mWbYkV1iD0u-Bp7w6Hxf3Jf_RaqdA0aiq8ieNieQ6jNkLId7r3BvTwXXj7aKde6NRkd8hoZknTmEkphvxXH',
  212. '1031b8c41dfff97a311a7ac99863bdc5__id' => '1',
  213. '1031b8c41dfff97a311a7ac99863bdc5__expire' => 1577754295,
  214. ];
  215. 2019-12-30, 19:04:55
  216.  
  217. Apache/2.4.18 (Ubuntu)
  218.  
  219. Yii Framework/2.0.30
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement