fitbodylife / phpmemcacheadmin

Automatically exported from code.google.com/p/phpmemcacheadmin
0 stars 0 forks source link

Unable to set new data using Memcache API #26

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Navigate to /commands.php
2. In 'Execute predefined Command', choose the 'set' command.
3. Enter any key and value.
4. Choose 'Memcache' for API.

What is the expected output? What do you see instead?
In the console I expect:

Server 127.0.0.1:11211
SUCCESS

Instead, I receive a warning:

( ! ) Warning: Memcache::set() expects parameter 4 to be long, string given in 
/path/to/phpmemcachedadmin/phpMemcachedAdmin-1.2.2-r262/Library/Command/Memcache
.php on line 191

What version of the product are you using? On what operating system?
- phpmemcachedadmin 1.2.2-r262
- Mac OS X 10.9.3
- PHP Version 5.4.24
- Apache/2.2.26 (Unix)

Please provide any additional information below.

Library/Command/Memcache.php, line 191 is currently:

if(self::$_memcache->set($key, $data, 0, $duration))

It's missing some type casting, and should be:

if(self::$_memcache->set($key, $data, 0, (int) $duration))

Original issue reported on code.google.com by ja...@jamesmcfadden.co.uk on 27 May 2014 at 3:57