PHP array passed by reference? -


i've been looking answer issue have array far no answer here nor web.

we have typo3 website has indexed search configured , installed. crawl records (~60000) using crawler extension. configured , running fine saw records not appearing on search results.

i debugged typo3 code , found words not related records in index_rel table.

what found when running code enters method indextypo3pagecontent() on line 573 method checkwordlist() called array of words passed argument. inside method there unset of array values. wrong because if right array passed value, array outside method checkwordlist() changed, there less words. therefore words not reverse indexed record.

i can change code. easy. want understand problem. php bug? aren't php arrays passed value? using php 5.5 on ubuntu.

if can giving hint of what's happening appreciate much.

anyway posting bug on typo3 bug system.

bests,

b.

arrays passed value indeed (or have pointed reference if not modified in function or method, see rohit comment above).

i thought arrays different not. fatigue. debugging in late hours not productive.

anyway, found problem after digging more code. using typo3 4 lts version of indexed_search.

the method indexanalyze of indexer calls 2 other methods: analyzeheaderinfo , analyzebody. both methods identical except analyzeheaderinfo not set first (first occurrence) array index. in method submitwords, when query made unset first, mysql complains first being null. therefore insertion not made. not happen on newer version because of code cleansing. 1 can see in provided link code, there type cast int, therefore if first unset 0 , not null. 1 still discuss semantic of every metadata having first ocurrence equal 0 that's story.

hope using , old indexed_search of typo3. ;-)


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -