geohash icon indicating copy to clipboard operation
geohash copied to clipboard

Uninitialized string offset: -1

Open qinzhe opened this issue 8 years ago • 4 comments

PHP Notice: Uninitialized string offset: -1 in /home/server/gochat/geohash.class.php on line 110 PHP Warning: strpos(): Empty needle in /home/server/gochat/geohash.class.php on line 114 PHP Warning: strpos(): Empty needle in /home/server/gochat/geohash.class.php on line 119 PHP Notice: String offset cast occurred in /home/server/gochat/geohash.class.php on line 119

qinzhe avatar Aug 08 '16 10:08 qinzhe

这个问题解决了吗?

Hkesd avatar Mar 31 '17 02:03 Hkesd

  1. line 27 public function Geohash() public function __construct()
  2. line 110 if (strpos($this->borders[$dir][$type], $lastChr) !== false) if (strpos($this->borders[$dir][$type], $lastChr) !== false && !empty($base))
  • 我当前php版本为 7.2

seebyyu avatar Aug 24 '18 02:08 seebyyu

参数顺序可能有问题,注意调用encode经纬度传参顺序

xuekang avatar Feb 03 '24 06:02 xuekang

sql优化建议:SELECT * FROM address WHERE LEFT(geohash,5) IN ('wm6n0','wm6j8','wm6jc','wm3vz','wm3yp','wm6n1','wm6j9','wm3vx','wm6jb')

xuekang avatar Feb 03 '24 06:02 xuekang