Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix for bug 5788 , client options not an array when generating a stub…

…, also strtolower stub names since were comparing them against strtolowered classes

git-svn-id: http://svn.php.net/repository/pear/packages/HTML_AJAX/trunk@199281 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
commit 845bd941814d80591dc9cfac356939dd97c1dfd3 1 parent c0a9db1
Joshua Eichorn authored
Showing with 5 additions and 6 deletions.
  1. +5 −6 AJAX/Server.php
View
11 AJAX/Server.php
@@ -221,6 +221,9 @@ function generateClient()
// create a list list of js files were going to need to output
$fileList = array();
+ if(!is_array($this->options['client'])) {
+ $this->options['client'] = array();
+ }
foreach($this->options['client'] as $library) {
if (isset($this->javascriptLibraries[$library])) {
$lib = (array)$this->javascriptLibraries[$library];
@@ -393,7 +396,7 @@ function clientJsLocation()
*/
function _loadOptions()
{
- $this->options = array('client'=>false,'stub'=>false);
+ $this->options = array('client'=>array(),'stub'=>array());
if (isset($_GET['client'])) {
$this->options['client'] = array();
if (strstr($_GET['client'],',')) {
@@ -412,8 +415,6 @@ function _loadOptions()
if (count($client) > 0) {
$this->options['client'] = $client;
- } else {
- $this->options['client'] = false;
}
}
if (isset($_GET['stub'])) {
@@ -426,14 +427,12 @@ function _loadOptions()
foreach($stubs as $val) {
$cleanVal = $this->_cleanIdentifier($val);
if (!empty($cleanVal)) {
- $stub[] = $cleanVal;
+ $stub[] = strtolower($cleanVal);
}
}
if (count($stub) > 0) {
$this->options['stub'] = $stub;
- } else {
- $this->options['stub'] = false;
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.