when using single quote dont recognize internal functions, double quote fix that.

i found this when array_map issues an error in php where im calling an internal function and array_map tells that the function is not existing, double quote fixed it.

Comments

damien tournoud’s picture

Status: Active » Closed (works as designed)

Not sure what's happening with your installation of PHP, but this is definitely ok.

keichee’s picture

Status: Closed (works as designed) » Needs review

no.. try the drupal functions with single quote, it will return error.

i found this because i want to change the unserialize to drupal_json_decode in one array_map
it wont run, until i fixed it by using double quotes..

if you like, i can attach the unserialize to drupal_json_decode patch and use single quotes in array_map so you can reproduce the error

if you like, i can attach screenshots too for your convenience.

keichee’s picture

StatusFileSize
new1.19 KB

this patch is using single quotes thus array_map will return fail to a predefined function

keichee’s picture

StatusFileSize
new1.19 KB

this patch is using double quotes thus array_map will return success to a predefined function

Status: Needs review » Needs work

The last submitted patch, array_map_error.patch, failed testing.

keichee’s picture

hmm im testing using my local host server and relying to php_errors.log,

i dont know how to fix this error:

[@reason] => failed to enable simpletest module

please help

keichee’s picture

StatusFileSize
new124.73 KB

heres a screenshot of the error

damien tournoud’s picture

Status: Needs work » Closed (works as designed)

'array_map_syntaxfix'

??

keichee’s picture

i created a predefined function thats called array_map_syntaxfix

if its double quotes, it succeed
and fails when single quotes

damien tournoud’s picture

I just tested that on 8.x and PHP 5.4-alpha, works perfectly as designed.

damien tournoud’s picture

My guess would be that you are using a broken build of PHP 5.4-alpha. Not sure how nor why, because even if you were asked several times your bug reports are still completely useless.