草庐IT

expection

全部标签

javascript - React+Redux - Uncaught Error : Expected the reducer to be a function

我尝试了简单的react、redux、ajax工作示例并遵循了RedditAPItutorial,但我无法创建商店并收到错误消息:UncaughtError:Expectedthereducertobeafunction.index.jsx...import{createStore,applyMiddleware}from'redux'varthunkMiddleware=require('redux-thunk');varcreateLogger=require('redux-logger');varrootReducer=require('./reducers.js');const

javascript - 在ie9中上传得到js错误: SCRIPT5007: Object expected

我正在尝试在div上绑定(bind)uploadify。当我点击上传按钮时,它显示错误,如SCRIPT5007:Objectexpected.对于以下链接的演示检查,它在ie9中拖动div时产生了错误头正文ThiscontainerisnotdraggableinIE9butitworksinChromeandFF.Whynot?js$('#uploadify-item').uploadify({'swf':'http://www.uploadify.com/uploadify/uploadify.swf','uploader':'http://www.uploadify.com/up

javascript - 过滤器 :notarray Expected array but received: 0

Controller@RequestMapping(value="/graphs",method=RequestMethod.GET,produces=MediaType.APPLICATION_JSON_VALUE)publicCollectiongetSkeletonGraph(){log.debug("RESTrequesttogetcurrentgraphs");returngraphService.getSkeletonGraphs();}Angular调用$scope.graphs=[];Graph.getGraphs().$promise.then(function(re

php - Zend_Soap - 错误解析 WSDL : Start tag expected, '<' 未找到

对于完全有效的同一个WSDL,我可以像这样使用PEARSOAP正确访问它:$WSDL=newSOAP_WSDL($this->wsdlUrl);$proxy=$WSDL->getProxy();但是不能让它通过Zend_Soap工作,当这样使用时:$soapclient=newZend_Soap_Client($this->wsdlUrl);通过Zend_Soap_Client访问时出现以下错误:Error:SOAP-ERROR:ParsingWSDL:Couldn'tloadfrom'https://abc.xyz.com/agent/TestService.php?wsdl':St

php - 故障排除 "Warning: mysqli_result::fetch_array() expects parameter 1 to be long, object given"

我收到的警告是:Warning:mysqli_result::fetch_array()expectsparameter1tobelong,objectgivenin...line103.我在第103行旁边注释了while($row=$result->fetch_array($result)){问题2:我可以将其中的任何内容存储在包含文件中吗?问题3:对于$query,我可以将这些Buyer、Seller中的任何一个存储在某个数组中吗?怎么办?/*FETCHCONTACTINFORMATION*/$query=("SELECT*FROMcontactsWHEREcontacttypeI

php - Doctrine2 错误 "Expected known function, got ' COUNT'"when in order by clause

我正在使用doctrine2我尝试根据售出的门票数量获取“事件”的数量$manager=$this->getDoctrine()->getManager();$builder=$manager->createQueryBuilder();return$builder->select('e')->from('AppBundle:Event','e')->leftJoin('e.tickets','t')->orderBy('COUNT(t)')->groupBy('e.id')->setMaxResults(10)->getQuery()->getResult();这会产生错误[Synt

php - 警告 : get_class() expects parameter 1 to be object

一周前我写了一个代码,它运行良好。但是今天当我检查它时,它给了我一些问题,比如Warning:get_class()expectsparameter1tobeobject,arraygivenin/home/ccc/public_html/horoscope/xml2json.phponline182Warning:get_class()expectsparameter1tobeobject,stringgivenin/home/ccc/public_html/horoscope/xml2json.phponline182Warning:get_class()expectsparame

php - Wordpress 警告 : call_user_func_array() expects parameter 1 to be a valid callback, 数组必须恰好有两个成员

我正在尝试添加一个自定义函数,该函数将添加Access-Control-Allow-Originheader,因为我无法访问服务器上的.conf文件。下面是我的代码;add_filter('wp_headers',array('eg_send_cors_headers'),10,1);functioneg_send_cors_headers($headers){$headers['Access-Control-Allow-Origin']=get_http_origin();$headers['Access-Control-Allow-Credentials']='true';if('

php - symfony2 phpunit : how to get exception message when status code is not expected one

在我的symfony2应用程序中,我使用phpunit来测试每个Controller的Action响应的状态代码是否是预期的。如果不是,我如何让phpunit显示异常附带的错误消息,或者最好模拟一个探查器异常页面?这是因为我在phpunit中有一个返回500代码的操作,但它在我的浏览器中加载得很好。我的代码:/***@dataProviderurlProvider*@param$url*/publicfunctiontestPageIsSuccessful($url){$client=self::createClient(array(),array('PHP_AUTH_USER'=>'

php - 给出的错误 : array_flip() expects parameter 1 to be array, 字符串

我是Laravel的新手,遇到以下错误,array_flip()expectsparameter1tobearray,stringgiveninGuardsAttributes.phpline188atHandleExceptions->handleError(2,'array_flip()expectsparameter1tobearray,stringgiven','/Users/aaronmk2/Desktop/CodingDojo/php/onetoone/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Con