kint-php / kint

Kint - Advanced PHP dumper
https://kint-php.github.io/kint/
MIT License
2.77k stars 292 forks source link

Bug ? Wut ? #133

Closed Glaived closed 9 years ago

Glaived commented 10 years ago

aaa

// in private function _getAllItems($url)
// from class Alienware extends \GiveMeSomeGoodNews\Core\Controller
\Kint::dump( $items ); //
var_dump( $items );
// ...

serialize()

a:4:{i:0;a:4:{s:5:"title";s:48:"Magicka: Wizard Wars Alienware Robe Key Giveaway";s:4:"guid";s:40:"ddcafe286003d79e0083dc32234b88a874c68aba";s:11:"description";s:513:"Go down in a blaze of glory with this exclusive Alienware Arena key for the Alienated Speedster robe. At the cost of 100 HP, you'll gain a 4% speed boost to outmaneuver your enemies and claim victory over their burnt corpses. With amazing Steam reviews like this: 8 elements, loads of fun, and beautiful C-H-A-O-S! Seriously get this game ASAP-[Nii-Wizards] Bacitoto Why haven't you gotten your exclusive robe and joined the action yet? Additional batch of keys added! About Magicka: Wizard Wars: Mag...";s:7:"pubDate";s:10:"1411954938";}i:1;a:4:{s:5:"title";s:47:"Kill The Bad Guy 33 Steam Discount Key Giveaway";s:4:"guid";s:40:"c3af1d6c9caae31d9f3058d51cd90c6808f2d560";s:11:"description";s:502:"Locate the target, execute a brilliantly sadistic plan, and watch the end result with this 33% Steam Discount for Kill The Bad Guy. Serving justice is just the side effect. Executing a brilliant plan intent on inflicting brutal pain is the real objective in Kill The Bad Guy. About Kill The Bad Guy: Does everyone deserve a second chance? Can crimes ever be forgotten? Hiding behind the mask of the average man on the street, and furtively blending into the background, many war criminals, ex-Mafia...";s:7:"pubDate";s:10:"1411954938";}i:2;a:4:{s:5:"title";s:39:"Broforce 25 Steam Discount Key Giveaway";s:4:"guid";s:40:"a4f301e1f8fc8d3414c2be65cd23f658ed55bebc";s:11:"description";s:504:"Never has it been more fun to turn the rest of the world into your own personal Brodom. Unleash liberty and freedom onto the rest of the world with this 25% Steam discount for Broforce. Bro with others or all on your own as the world once again turns to Broforce to raise the world to Brocon 1. So, what are you waiting for, a Brovitation? About Broforce: When evil threatens the world, the world calls on Broforce - an under-funded, over-powered paramilitary organization dealing exclusively in exce...";s:7:"pubDate";s:10:"1411954938";}i:3;a:4:{s:5:"title";s:45:"Shadow Warrior 75 Steam Discount Key Giveaway";s:4:"guid";s:40:"1764699fa1773b09b3e2d79558784d6f05b559b0";s:11:"description";s:505:"Need to stop a demonic invasion? A combination of guns, katana, magic, and wit are your weapons. Take this 75% Steam discount code for Shadow Warrior and decide what combination of death you will bring to the hoards of invading demons. About Shadow Warrior: Shadow Warrior tells the offbeat tale of Zilla Enterprise’s corporate shogun, Lo Wang, who is ordered by his employer to track down and acquire a legendary blade known as the Nobitsura Kage. Forced into a timeless battle, Lo Wang learns of th...";s:7:"pubDate";s:10:"1411954938";}}
raveren commented 10 years ago

Well that is definitely really really weird, thanks for the informative report.

The serialzed string throws an equally weird [ Notice ] unserialize(): Error at offset 680 of 2802 bytes which, I'm guessing is because the description field of the first array is denoted as s:513 which means it's a 513-length string, but it ends with "About Magicka: Wizard Wars: Mag..." and is actually 503 chars long including the "...". I have no remotest idea why this might be happening save for null-bytes or other untype-able characters in the text. Could you please try the WIP branch and see whether it handles the array correctly:

https://github.com/raveren/kint/tree/1.0.0-wip

thanks again!

Glaived commented 10 years ago

Same problem with: "raveren/kint": "~1.0@dev"

:'(

raveren commented 10 years ago

could you please try \Kint::dump( $items[1] ); and tell me what type does kint report, it should be "string UTF-8", what does it say about the length of the string?

raveren commented 10 years ago

or, rather

ini_set( 'display_errors', 1 );
error_reporting( -1 );

\Kint::dump( $items[1]['description'] );
Glaived commented 10 years ago

aaa

"raveren/kint": "~1.0@dev"

        ini_set( 'display_errors', 1 ); //
        error_reporting( -1 ); //

        \Kint::dump( $items[1]['description'] ); //
        var_dump( $items[1]['description'] ); //
        die(__FILE__.':'.__LINE__); //
raveren commented 10 years ago

Crap, I cannot pinpoint the source of the error unless you could give me the source of the above page, but not copy pasted, but saved webpage, 'cause there's something strange with the "Locate target..." text and I need it in its fullest (i.e. the var_dump, I hope it dumps invisible symbols too) to reproduce the error - and the js one too :/

I'd really appreciate this, send the saved page if you find the time to raveren@gmail.com - thanks a lot!

Glaived commented 10 years ago

Currently, I board failed to reproduce the problem, the data is recovered via parsing a remote site from the HTML corp, I'll still create a clone of my project, clean it, then tried to reproduce the problem, once done, I would be providing you here on github, a zip file containing my application.

raveren commented 10 years ago

Thanks! You could just give me the url of the site you're parsing, I can get its source myself :)

On Wed, Oct 1, 2014 at 10:57 AM, GlaiveÐ notifications@github.com wrote:

Currently, I board failed to reproduce the problem, the data is recovered via parsing a remote site from the HTML corp, I'll still create a clone of my project, clean it, then tried to reproduce the problem, once done, I would be providing you here on github, a zip file containing my application.

— Reply to this email directly or view it on GitHub https://github.com/raveren/kint/issues/133#issuecomment-57430723.

Glaived commented 10 years ago

the site is local, you want the PHP or HTML content back?

raveren commented 10 years ago

the html please, I need the string that fails to show, but do not simply copy paste it, I need the source file, cause it might lose invisible characters or misencodes if you paste it...

On Wed, Oct 1, 2014 at 11:00 AM, GlaiveÐ notifications@github.com wrote:

the site is local, you want the PHP or HTML content back?

— Reply to this email directly or view it on GitHub https://github.com/raveren/kint/issues/133#issuecomment-57431017.

Glaived commented 10 years ago

Well, I will provide it as soon as possible on the web address, or the information I get is this: http://eu.alienwarearena.com/giveaways (with cookie home_site=eu.alienwarearena.com; to bypass security)

raveren commented 10 years ago

can I ask you a favor again? Could you paste the output of:

ini_set( 'display_errors', 1 ); //
error_reporting( -1 ); //

sd(
    base64_encode( $items[1]['description'] ),
    get_loaded_extensions(),
    phpversion()
);
raveren commented 10 years ago

hey, you still here? :) I'd like to finish this..

Glaived commented 10 years ago

sorry for the wait

php 5.5.9

ext:

Core
bcmath
calendar
ctype
date
ereg
filter
ftp
hash
iconv
json
mcrypt
SPL
odbc
pcre
Reflection
session
standard
mysqlnd
tokenizer
zip
zlib
libxml
dom
PDO
bz2
SimpleXML
wddx
xml
xmlreader
xmlwriter
apache2handler
openssl
curl
mbstring
exif
mysql
mysqli
Phar
pdo_mysql
pdo_sqlite
mhash
xdebug

Information from a remote site, I do not think I can reproduce the bug. I try and no problems ^^

raveren commented 9 years ago

if this cannot be reproduced anymore, I'm closing it :)