Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEAR 로딩시 기존의 include_path 설정을 덮어쓰지 않도록 변경 #1546

Merged
1 commit merged into from Jul 6, 2015
Merged

PEAR 로딩시 기존의 include_path 설정을 덮어쓰지 않도록 변경 #1546

1 commit merged into from Jul 6, 2015

Conversation

kijin
Copy link
Contributor

@kijin kijin commented Jun 13, 2015

XE에 포함된 PEAR 라이브러리를 사용하기 위해 requirePear() 함수를 호출하면 기존의 include_path에 등록되어 있던 경로들을 모두 삭제하고 PEAR 로딩 경로만 덩그러니 남게 됩니다.

XE 내부적으로는 대체로 절대경로를 사용하여 인클루드하기 때문에 큰 문제가 없지만, 서드파티 프로그램이나 다른 라이브러리들과 연동할 때 문제가 발생할 수 있습니다.

PHP에서 set_include_path() 함수를 사용할 때는 반드시 get_include_path() 함수를 먼저 호출하여 기존의 경로 목록을 구한 후, 거기에 내가 원하는 경로를 덧붙이는 것이 정석입니다.

https://php.net/set_include_path 예제 참고.

@ghost ghost added the type/enhancement label Jul 6, 2015
@ghost ghost added this to the 1.8.4 milestone Jul 6, 2015
@ghost ghost self-assigned this Jul 6, 2015
ghost pushed a commit that referenced this pull request Jul 6, 2015
PEAR 로딩시 기존의 include_path 설정을 덮어쓰지 않도록 변경
@ghost ghost merged commit 5a65c9d into xpressengine:develop Jul 6, 2015
@ghost ghost added the merged-pull-request label Jul 6, 2015
@kijin kijin deleted the fix/set-include-path branch July 6, 2015 06:59
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant